Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
622
DeleteRow event is not fired when row deleted from code
posted

Hi All,

A function DeleteRow() for DeleteRow event handler is added to the grid. This event is fired when delted the row  by selecting the cell and clicking the Delete Button.

When clicked on a button, code for deleting the row ( grid.Rows.RemoveAt(iSelectedItems[j])) is called. This is deleting the required row.  But the event for this is not called after deleting the row.

Is it possbile to fire the deleterow event when row is deleted using code.

regards,
Abhi

  • 28464
    Verified Answer
    posted

    Hello Abhi, 

    The DeleteRow event in the grid will be fired when a postback occurs if any rows have been deleted from the grid since the previous post. The DeleteRow event is used for detecting interaction between the end-user and the grid and will not be fired when you delete rows from the Rows collection on the server.

    An example for using DeleteRow can be found here:

    http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.Aspx?ArticleID=1104 

     Is it possible, to call a new method (not necessarily an event) and perform your custom actions there?