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

Complete Iteration of GridGroupingControl

Hi, I am using version 3.0.1.0 of GridGroupingControl and with hierarchicial display of data and with groupby, I am trying to loop through all the cells in a GridGroupingControl, I have tried to use the GGC.Table.TableModel[rowIndex,colIndex].FormattedText method but I only get the top level table cells. I am looking to get the data in the cells exactly as visible in the grid layout(including the caption rows'' text). Is there any way this can be done? I have also tried using GGC.Engine.GetEnumarator to obtain the different tables, but I miss out the caption rows, if I use the GGC.Table.DisplayElements then I am not able to reach the nested tables to get the data. Can you please suggest suitable techiniques for complete "what you see is what you get" iteration through the grid. Thanks. Prithvi

1 Reply

AD Administrator Syncfusion Team April 26, 2005 08:32 PM UTC

Hi Prithvi, I updated your Direct-Trac incident. Here is some code to get the details. If the display element is a nested table, you can access the NestedTable''s display elements. private void button1_Click(object sender, System.EventArgs e) { for(int i = 0; i < this.gridGroupingControl1.Table.DisplayElements.Count; i++) { Element el = this.gridGroupingControl1.Table.DisplayElements[i]; if(el.Kind == DisplayElementKind.NestedTable) { GridNestedTable nt = (GridNestedTable) el; foreach(Element el1 in nt.ChildTable.NestedDisplayElements) { System.Diagnostics.Trace.WriteLine(el1); } i += (nt.ChildTable.NestedDisplayElements.Count - 1); } else { System.Diagnostics.Trace.WriteLine(el); } } } GGC_18197.zip Best regards, Jay N

Loader.
Live Chat Icon For mobile
Up arrow icon