Gets or sets a value indicating whether the multiple Row selection is enabled.

Namespace: Dapfor.Net.Ui
Assembly: Dapfor.Net (in Dapfor.Net.dll) Version: 2.10.3.24917 (2.10.3.24917)

Syntax

C#
public bool MultipleEnabled { get; set; }
Visual Basic
Public Property MultipleEnabled As Boolean
	Get
	Set
Visual C++
public:
property bool MultipleEnabled {
	bool get ();
	void set (bool value);
}
F#
member MultipleEnabled : bool with get, set

Property Value

Type: Boolean
true if multiple Rows can be selected; otherwise, false.

Remarks

You can select single or multiple rows in the grid with Row.Selected property and Grid.Selection.Enabled / Grid.Selection.MultipleEnabled property. All selected lines are added to Grid.Selection collection that supports iteration. To unselect all rows, call Grid.Selection.Clear() method.
 Copy imageCopy
public void ExampleSelection(Grid grid)
{
    //Set a new semi-transparent color for selected rows
    grid.Selection.Color = Color.FromArgb(80, 102, 36, 10);

    //Allow selection in grid
    grid.Selection.Enabled = true;

    //Allow multiple selection in grid
    grid.Selection.MultipleEnabled = true;

    //Rows in the collection should be in order
    grid.Selection.Sorted = true;


    //Select the 5th row
    grid.Rows[5].Selected = true;

    //Enumerate the selected rows...
    foreach (Row row in grid.Selection)
    {
        //Do something here...
    }

    //Clear the selection
    grid.Selection.Clear();
}

See Also