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
1330
Rows Removed Event doesn't fire
posted

My problem is very simple, I am removing a row from a win grid and the After rows removed event won't fire.  Conversely, the rows added event does not fire when adding rows.  

I'm not adding the rows manually.  The rows are being removed implicitly from a backend call, therefore I can't post the code.  The only code I have is a backend call.

Parents
No Data
Reply
  • 469350
    Offline posted

    The grid events only fire if the user removes or adds a row through the grid UI.

    If you remove (or add) a row in code from your data source in code, then the data source sends a notification to the grid (and other bound controls) that this happened. The grid, in this case, is a consumer of the event, not the originator.

    If you are modifying the data source in code, you really don't need an event to tell you that this happened, since you already know. But if you want to use an event, you may be able to hook an event on your datasource - or through the IBindingList interface, which is what the grid uses.

Children