Gets a list of all the selected rows.
Property Value
A reference to a
Xceed.Grid.Collections.SelectedRowList object containing all the selected rows. This collection can also be used to change the selected rows.
The following example demonstrates how to add rows to the grid's collection of selected rows and to remove all rows which are not
GroupManagerRow objects from the collection:
Dim row As Row
For Each row In gridControl1.SelectedRows
If Not TypeOf row Is GroupManagerRow Then
gridControl1.SelectedRows.Remove( row )
End If
Next row
Dim rowToAdd As Row
For Each rowToAdd In gridControl1.FixedHeaderRows
rowToAdd.CanBeSelected = True
gridControl1.SelectedRows.Add( rowToAdd )
Next rowToAdd
foreach( Row row in gridControl1.SelectedRows )
{
if ( ! ( row is GroupManagerRow ) )
{
gridControl1.SelectedRows.Remove( row );
}
}
foreach( Row rowToAdd in gridControl1.FixedHeaderRows )
{
rowToAdd.CanBeSelected = true;
gridControl1.SelectedRows.Add( rowToAdd );
}
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2