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

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. :)

3 Replies

AD Administrator Syncfusion Team November 15, 2004 03:21 AM

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 06:03 PM

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 04:10 AM

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

Loader.
Live Chat Icon For mobile
Up arrow icon