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
3045
AddRow Events for Add and Cancel When Bound To DataTable
posted

When adding a new row using the AddRow feature of UltraGrid, I need to create auxiliary data when create/edit is initiated, and when the user cancels adding the row, the auxiliary data also has to be deleted.

Any suggestions?  

Parents
  • 469350
    Offline posted

    I would use Before/AfterRowInsert instead of BeforeEnterEditMode. This event fires at the point at which the grid creates the new row in the data source, but before the user has entered any new data in to the row. 

    BeforeEnterEditMode will fire for any cell in the grid, both for AddNew rows and existing rows. So you could check IsAddRow inside that event and check to see if there is already data in the row in order to identify when the row is created. But using Before/AfterRowInsert is probably simpler. 

Reply Children