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.

GridGroupingControl (Refreshing)

Thread ID:





83649 Jun 26,2009 08:03 AM Aug 12,2009 09:34 AM Windows Forms 6
Tags: GridControl
Administrator [Syncfusion]
Asked On June 26, 2009 08:03 AM

I have a GGC linked a table, however I need refreshes the data which was modified.
What is necessary to refresh a GGC? It´s not only do:

gridgroupingcontrol1.datasource = null;
gridgroupingcontrol1.datasource = mytable;



Administrator [Syncfusion]
Replied On June 26, 2009 10:54 AM


Santosh U
Replied On July 17, 2009 11:04 AM


Can you please give the solution to me ??


Rajadurai C [Syncfusion]
Replied On July 21, 2009 02:15 AM

Hi Santosh,

Thanks for your interest in Syncfusion Products.

Please try setting TableDirtyOnSourceListReset property to true as this forces the engine to set TableDirty property to true thereby making grid refresh the data when the underlying datasource raises notification because of change.

this.gridGroupingControl1.TableDirtyOnSourceListReset = true;

If you are handling any change to record cells manually through code. You can add that code snippet between BeginUpdate() and EndUpdate() method.


Santosh U
Replied On August 4, 2009 09:41 AM


I have used the code but it does not work.

I will little brief about my requirement.

I have two tables for example products and its details.

I have a form above the grid having all details for Product and details as well. Once I Save that in to database and reset my dataset and bind it again and say gcc.update() it just shows the product and not the details.

Following is my code ( I am using Related Master details for hierarchy ).

private void BindGrid()
dtprod = getallproducts().Tables[0];
dtproddetails = getallproductdetails().Tables[0];
GridTableDescriptor RootTbl = gridGroupingControl1.TableDescriptor;

gridGroupingControl1.Engine.SourceListSet.Add("Product", dtprod);
gridGroupingControl1.Engine.SourceListSet.Add("ProductDetails", dtproddetails);

GridRelationDescriptor TestCaseToSteps = new GridRelationDescriptor();
TestCaseToSteps.ChildTableName = "ProductDetails";
TestCaseToSteps.RelationKind = Syncfusion.Grouping.RelationKind.RelatedMasterDetails;
TestCaseToSteps.RelationKeys.Add("product_id", "product_id");

gridGroupingControl1.DataSource = dtprod;

after saving new product and its details i update the grid in following manner
dtprod = getallproducts().Tables[0];
dtproddetails = getallproductdetails().Tables[0];
gridGroupingControl1.DataSource = dtprod;

But the above code does not work properly it just shows the Product in the grid after update and the underlying grid (the details one) does not get updated).

Please help me.
Santosh U

Rajadurai C [Syncfusion]
Replied On August 5, 2009 10:47 AM

Hi Santosh,

Thanks for your details.

While rebinding the related datatables, ensure the following has been done.
1) Add the relation to the tabledescriptor.
2) Add the child table to the SourceListSet collection of Engine.(If this is not set after setting the datasource to null and before rebinding the datasource, the childtable items cannot get displayed).

Here is the code that has to be handled while rebinding inorder to show the grid without losing its relation.

this.gridGroupingControl1.DataSource = null;
this.gridGroupingControl1.Engine.SourceListSet.Add("ProductTable", productTable);
this.gridGroupingControl1.Engine.SourceListSet.Add("DetailTable", detailTable);
this.gridGroupingControl1.DataSource = productTable;

Please refer to the following sample in which this code has been implemented.


Santosh U
Replied On August 12, 2009 09:34 AM

Hi Rajadurai,

This works gr8 now.

Thanks for the help.

Santosh U


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.