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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

refresh in databoundgrid

Thread ID:





13300 Apr 26,2004 05:16 AM UTC Apr 26,2004 11:35 AM UTC WinForms 1
Tags: GridControl
Asked On April 26, 2004 05:16 AM UTC

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

Administrator [Syncfusion]
Replied On 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();


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon