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

refresh in databoundgrid

Thread ID:

Created:

Updated:

Platform:

Replies:

13300 Apr 26,2004 01:16 AM Apr 26,2004 07:35 AM Windows Forms 1
loading
Tags: GridControl
Syl
Asked On April 26, 2004 01:16 AM

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 07:35 AM

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();

CONFIRMATION

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.

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.

;