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
What event can I use in order to determine that the list has changed?
posted
I use the WinGrid with a DataTable as the DataSource.
If I have a row in the DataTable removed, it will be removed automatically in the grid.
If I see a value in a cell in the DataTable change, this will also be automatically updated in the grid.


What event can I use in order to determine that the list has changed?
*Regardless of what type is my DataSource*

THX

Parents
  • 37774
    Suggested Answer
    posted

    There is no event that will be fired on the grid for this, since the grid will not re-fire events that were triggered from the underlying list (i.e. ListChanged). The grid will only fire the events that are, for the most part, triggered by a user action through the UI.  This is because the grid is only listening to these events and taking the appropriate action, so if you need to know if a row is changed or deleted, the appropriate events on the data source should be used.  In the case of a DataTable, you would have RowChanged, RowDeleted, and TableNewRow, while in the case of an IBindingList, you would handle the ListChanged event.

    -Matt

Reply Children
No Data