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

refresh in databoundgrid

Hi! I have a boring problem in a GridDataBoundGrid using Hierarchical level... I have 2 tables in a dataset, I have a relation between these the tables on multiple columns. ... gdbg1.DataMember = "Table1" gdbg1.DataSource = _dataset Level1 = gdbg1.Binder.RootHierarchyLevel LevelX = gdbg1.Binder.AddRelation("MyRelation") ... Everything works fine for visualisation and simple editing! But, when I edit the parent row, I have to update specific colums in child rows. Here is a code exemple I use : Dim rs As GridBoundRecordState = Me.gdbg1.Binder.GetRecordStateAtRowIndex(Me.gdbg1.CurrentCell.RowIndex) For Each drv As DataRowView In rs.Parent.ChildList drv.Row.Item("Something") = NewValue Next The problem is that after every update, there is no refresh! so sometimes, I must point on the updated child cell to have my refresh.... and sometimes, I must collapse and then expand child rows.... The question is : How to force refresh???? Thanks a lot! Bye Syl

1 Reply

AD Administrator Syncfusion Team April 26, 2004 11:35 AM UTC

Normally, to refresh the grid, you shoul donly have to call grid.Refresh(). This should take care of the times that just moving the mouse over the values should redraw them. But if there are situations where you actually need to close and open a node to refresh things, then calling grid.Refresh() will not be sufficient. Below is a snippet that "sliently" closes and opens a node, and then redraws it. Maybe something like this will work for you. this.gridDataBoundGrid1.BeginUpdate(); this.gridDataBoundGrid1.Model.SuspendChangeEvents(); this.gridDataBoundGrid1.ExpandAtRowIndex(rowIndex); this.gridDataBoundGrid1.CollapseAtRowIndex(rowIndex); this.gridDataBoundGrid1.Model.ResumeChangeEvents(); this.gridDataBoundGrid1.EndUpdate(); this.gridDataBoundGrid1.Refresh();

Live Chat Icon For mobile
Up arrow icon