FlexGrid for WinForms
Selected Property (RowCollection)

Gets a collection of Row objects that are currently selected.
Public ReadOnly Property Selected As RowCollection
Dim instance As RowCollection
Dim value As RowCollection
value = instance.Selected
public RowCollection Selected {get;}
property RowCollection^ Selected {
   RowCollection^ get();
This property is especially useful when the grid's SelectionMode property is set to SelectionModeEnum.ListBox.

The code below removes all selected rows from the grid.

Note that foreach loops can't be used to modify the collections being iterated over. This example works because the Selected collection is being enumerated while the Rows collection is being modified.

// delete all selected rows
foreach (Row r in _flex.Rows.Selected)

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

See Also


RowCollection Class
RowCollection Members



Copyright (c) GrapeCity, inc. All rights reserved.

Send Feedback