I need to update the Row Count on a label near the WinGrid.
The Grid update is made in different ways - datasource change, manual adds/removs, sql initialisations, etc.
Is there a universal event raised when the Grid changes the rom number (datasource change including)?
Hi,
No, the grid will raise events when the user removes a row from the grid, but if the row is added/removed from the data source, the grid is a consumer of an event notification in that case, not the initiator.
So you will probably need to hook events on the DataSource, as well as the grid. You may need to cast your DataSource into an IBindingList and trap the ListChanged event.
yeah, I understood that I can't have that event... so I identified manually in code where I do the add/remove rows, or update the datasource, and the I executed my label update with the Rows.Count...