ADAdministrator Syncfusion Team July 27, 2004 01:35 AM
There is no simple way to to this. You will have to get the parent row object somehow, find its rowindex in the grid, and then iterate through its child table to find the row object you are looking for.
Alternatively, if the grid is displaying a column from your child table with unique values, and teh grids involved are not terribly large, you could iterate through all the rws in the grid looking for the particular child. Take a look at this whole thread. At the bottom, there is a sample that does this.
SISilenterJuly 28, 2004 04:29 AM
I use gdbg for displaying realtime data.
And when realtime data is received from dataprovider I find correspond row in my dataset, then change that row and then refresh gdbg. But I don''t want to refresh entire grid. I want to refresh only corresponding rows.
are there any ways to implement it?
ADAdministrator Syncfusion Team July 28, 2004 05:29 AM
I think you will have to dynamically subscribe and unsubscribe to the child table''s ListChanged event for each parent node in RowExpanding and RowCollapsing. Then you can maintain a hastable of these child tables and the location of their parentrows. Then in the ListChanged handler, you can retrieve the parent row and use the e.NewIndex to determine the grid row that needs refreshing. (Note that when a parent row collapses, you may have to adjust the row values in the hashtable.)
Here is a minimal sample that seems to be working ok. As you press the button on the form, a different child row is modified, and only that child row is refreshed.