Articles in this section
Category / Section

How to make a particular record as a current record based on some condition ?

1 min read

 

To make a particular record as a current record based upon some condition can be done by accessing that particular record by iterating through the collection of records avilable in GridGroupingControl, and make it as a current record by using the SetCurrent method. Please refer the below code snippet which illustrates this:

C#

foreach (Record r in this.GridGroupingControl1.Table.Records)

{

//check the values of CustomerID, based on this condition we marks as Current Record

if (r.GetValue("Col0").ToString() == "row2 col0")

{

//Makes the record as Current Record

r.SetCurrent();

}

}

VB

For Each r As Record In Me.GridGroupingControl1.Table.Records

'check the values of CustomerID, based on this condition we marks as Current Record

If r.GetValue("Col0").ToString() = "row2 col0" Then

'Makes the record as Current Record

r.SetCurrent()

End If

Next r

Sample:

http://help.syncfusion.com/support/samples/kb/Grid.Web/6.1.0.34/GGCCurRec/Currentrec.zip

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied