How to travels through the records in the GridGroupingControl?

hi,can anyone tell me how to travels through the records in the GridGroupingControl? I got 3 columns in my GridGroupingControl which bind to a datasource and one of the column celltype is checkbox. I wanted to travel through all these records to check whether the Checkbox column value is checked or unchecked. if it uncheck, how to set it check ? thanks for any advice. :)

5 Replies

AD Administrator Syncfusion Team November 15, 2004 08:21 AM UTC

If this is a flat table, you can use this code to loop through its records. You an use r.SetValue to set a value.
private void button1_Click(object sender, System.EventArgs e)
{
	foreach(Record r in this.gridGroupingControl1.Table.Records)
	{
		Console.WriteLine(r.GetValue("Col1"));
	}
}


VL Vincent Loy Chee Hoon November 15, 2004 11:03 PM UTC

Can you give an example in VB version ? thanks :) >If this is a flat table, you can use this code to loop through its records. You an use r.SetValue to set a value. >
>private void button1_Click(object sender, System.EventArgs e)
>{
>	foreach(Record r in this.gridGroupingControl1.Table.Records)
>	{
>		Console.WriteLine(r.GetValue("Col1"));
>	}
>}
>


AD Administrator Syncfusion Team November 16, 2004 09:10 AM UTC

Here is a site that is pretty good at translating snippets from C# to VB. http://authors.aspalliance.com/aldotnet/examples/translate.aspx
Private Sub button1_Click(sender As Object, e As System.EventArgs)
   Dim r As Record
   For Each r In  Me.gridGroupingControl1.Table.Records
      Console.WriteLine(r.GetValue("Col1"))
   Next r
End Sub ''button1_Click


HK Heinrich Klaaseen March 13, 2026 09:55 PM UTC

You can loop through the records in GridGroupingControl using the Table.Records collection.
Check the checkbox field for each record, and if it’s unchecked, set its value to true programmatically and refresh the grid to apply the change. For additional insights and different resources, you can also discover more.



SR Senthilkumar Ranganathan Syncfusion Team March 16, 2026 05:18 AM UTC

Heinrich Klaaseen

Thank you for the suggestion. Please feel free to reach out if you need any further assistance; we will be happy to help.


Loader.
Up arrow icon