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

Loader.
Up arrow icon