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?
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.
Will Before/AfterRowInsert fires when programmatically inserting a row to the DataTable directly? Since I'm only concern when the row is added using AddRow, I want to know if I have to check if the row is inserted in some other way.
Thanks,