We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

RefreshRange

Hi everyBody, i have a table containg three nested tables, how can i refresh just the second table or a row in the second nestedTable Thank you

5 Replies

AD Administrator Syncfusion Team December 3, 2005 11:50 PM UTC

You can try using either: this.gridGroupingControl1.GetTableControl("ChildTable").Refresh(); or this.gridGroupingControl1.GetTableControl("ChildTable").RefreshRange(someRange);


AD Administrator Syncfusion Team December 4, 2005 09:30 AM UTC

Thanks, i have in the dataset the tables with relations A->B->C, and what i want is to refresh a given row in the childTable "B" which is one of many other childtables "B"


AD Administrator Syncfusion Team December 4, 2005 10:44 AM UTC

>>refresh a given row in the childTable "B" How do you know the given row? Do you know a GridRecord object, or a DataRowView object, or a primary key value for the row, or something else?


AD Administrator Syncfusion Team December 4, 2005 10:59 AM UTC

This is my code : Point point = grid.TableControl.PointToClient(Control.MousePosition); Element element = grid.TableControl.PointToNestedDisplayElement(point); if(element is GridRecordRow) { GridRecord rec = element.ParentRecord as GridRecord; if(rec != null) { if (rec.ParentChildTable.Name = "ChildTableName") { int row = gt.FilteredRecords.IndexOf(rec); grid.GetTableControl("ChildTableName").RefreshRange(GridRangeInfo.Rows(row)) but it''s not working thnks


AD Administrator Syncfusion Team December 4, 2005 11:32 PM UTC

Usually, you do not have to worry about refreshing a row. If values in datarow are changed outside the grid, the grid should handle the appropriate IBindingList.ListChanged event to refresh the row without any action on your part. If you are trying to change some style attribute on the particular row, then you should probably be using QueryCellStyleInfo to handle this. You cannot do it trying to explicitly setting the style properties using an indexer on the grid. Here is a little sample that chnages the color of a row as you click bttons on the form. The button handlers call RefreshRange to force the rowto redraw to show the new color through QueryCellStyleInfo. http://www.syncfusion.com/Support/user/uploads/GGC_nestedTables_e1a1003d.zip

Loader.
Live Chat Icon For mobile
Up arrow icon