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
close icon

Refersh GGC.Engine.SourceListSet

Dear Sir/Madam

I have a GGC which have relation , this relation have datasource : gridData.Engine.SourceListSet.Add("KHUVUC", lst);

when i add new object to list , how to refresh this SourceListSet to show new object

I refresh by define GGC again , i think it is not better way to refresh this SourceListSet 

Thank you for reading and helping me

Best Regard !

1 Reply

MG Mohanraj Gunasekaran Syncfusion Team July 27, 2017 11:06 AM UTC

Hi Truong,   
  
Thanks for using Syncfusion product.   
  
Suggestion 1   
  
To update the grid when adding a new row in list, we can use the Table.Reload and Refresh method. Please refer to the given code example,   
  
Code example   
this.gridGroupingControl1.Table.Reload();   
//Get the table for childtable.   
this.gridGroupingControl1.GetTable("MyChildTable").Reload();   
//Get the table for grand childtable   
this.gridGroupingControl1.GetTable("MyGrandChildTable").Reload();   
this.gridGroupingControl1.Refresh();   
   
Suggestion 2   
Also, we can bind the BindingList collection as a datasource for GridGroupingControl to reflect the changes automatically, when adding a new row at run time and not necessary to use the Reload and Refresh method. Please refer to the below code example and a sample,   
  
Code example   
BindingList<ParentList> parentTable = GetParentTable();   
BindingList<ChildList> childTable = GetChildTable();   
BindingList<GrandChildList> grandChildTable = GetGrandChildTable();   
   
this.gridGroupingControl1.Engine.SourceListSet.Add("MyParentTable", parentTable);   
this.gridGroupingControl1.Engine.SourceListSet.Add("MyChildTable", childTable);   
this.gridGroupingControl1.Engine.SourceListSet.Add("MyGrandChildTable", grandChildTable);   
   
   
Sample link: GridGroupingControl   
  
Regards,   
Mohanraj G  
 


Loader.
Live Chat Icon For mobile
Up arrow icon