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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Correct Way to Refresh a GGC after underlying data has changed

Thread ID:





75032 Jul 9,2008 12:49 PM UTC Jul 10,2008 11:54 AM UTC WinForms 1
Tags: GridControl
Kevin Bechard
Asked On July 9, 2008 12:49 PM UTC

We are using GGC version and we are looking for advice on the best way to refresh the grid when the underlying data has changed.

This is the method that we currently use but it does not seem to work all of the time:

public void UpdateRecordsWithBackendData(RecordsInTableCollection records)
foreach (Record record in records)
// Force end on the current record

// Get the back end data

// Purge the cache

SubhaSheela R [Syncfusion]
Replied On July 10, 2008 11:54 AM UTC

Hi Kevin,

Thanks for your interest in Syncfusion products.

Rebindng Datatable
you have to reset the DataSource before rebinding it. The best way to do this would be calling the grid.BeginUpdate() and grid.Binder.SuspendBinding() before you modify the underlying DataSource and call grid.Binder.ResumeBinding() and grid.EndUpdate() after that.

The SuspendBinding and ResumeBinding are two methods that allow the temporary suspension and resumption of data binding. You would typically suspend data binding if you want to make several changes to the data source without immediately updating the grid after each change.

For example, if you want to clear out all records in your data set and refill it with its original data, you can improve performance of this operation substantially if the grid does not need to immediately reflect every row change in the grid while the data set is filled.

BeginUpdate method suspends the painting of associated grid controls until the EndUpdate method is called.

Also, call grid.Binder.ResetHierarchyLevels() if you have changed the underlying data source and you had several relations added. Below is the code snippet:

this.gridDataBoundGrid1.DataSource = null;
this.gridDataBoundGrid1.DataMember = null;
this.gridDataBoundGrid1.DataSource = ds;
this.gridDataBoundGrid1.DataMember = "ParentTable";

Changing the underlying data only

Calling the grid.Engine.ResetTable() in the button event handler will help you to make the proper values appear.


Please let me know if it helps.

Subhasheela R


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

or the page will be automatically redirected to 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