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
395
looking for events that tells me when a new row was added or removed
posted

hello,

I'm looking for a good event that tells me when a new row was added via the data source or a row has been removed from the data source.
Something like that already works with the event "InitializeRow". However, this does not work for deleted rows.
I do not know the type of data source, and therefore looking for a event at the ultra grid, to be informed regardless of the type of data source.

There are two events "AfterRowInsert" and "AfterRowsDeleted" that unfortunately not fire when the row was added or deleted by code.

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    There is no event for this in the grid. When you delete a row in the data source, the grid responds to a notification from the data source that a row was deleted. So in this case, the grid is a consumer of the event, not the source. Your best bet would be to hook into the events on the DataSource - you might need to cast it to an IBindingList.

    Or, change your code so that it doesn't delete the row from the data source directly, but instead does it through the grid.

Children