| List for WinForms Tutorials > Tutorial 6 - Selecting Multiple Rows Using Bookmarks |
In this tutorial, you will learn how to select and highlight records that satisfy specified criteria. A group of similar items is generally implemented as a collection in C1List. When manipulating a group of items in C1List, use techniques similar to those described here.

To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
Dim i As Long
For i = 0 To Me.DsComposer.Composer.Rows.Count - 1
If Me.DsComposer.Composer.Rows(i).Item("Country") = "Germany" Then
</code><br/> Me.C1List1.SelectedIndices.Add(i)
End If
Next i
|
|
To write code in C#
| C# |
Copy Code
|
|---|---|
long i;
for ( i = 0; i <= this.DsComposer.Composer.Rows.Count - 1; i++)
{
if ( this.DsComposer.Composer.Rows[i] ["Country"] == "Germany" )
{
</code><br/>this.c1List1.SelectedIndices.Add(i);
}
}
|
|
To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
Me.C1List1.ClearSelected() |
|
To write code in C#
| C# |
Copy Code
|
|---|---|
this.c1List1.ClearSelected(); |
|
This concludes the tutorial.