Specifies row selection settings in GridControl .

Namespace: Dapfor.Wpf.Controls
Assembly: Dapfor.Wpf (in Dapfor.Wpf.dll) Version: 4.1.0.26317 (4.1.0.26317)

Syntax

C#
[TypeConverterAttribute(typeof(ExpandableObjectConverter))]
public class GridControlSelectionSettings : INotifyPropertyChanged, 
	ICloneable
Visual Basic
<TypeConverterAttribute(GetType(ExpandableObjectConverter))>
Public Class GridControlSelectionSettings
	Implements INotifyPropertyChanged, ICloneable
Visual C++
[TypeConverterAttribute(typeof(ExpandableObjectConverter))]
public ref class GridControlSelectionSettings : INotifyPropertyChanged, 
	ICloneable
F#
[<TypeConverterAttribute(typeof(ExpandableObjectConverter))>]
type GridControlSelectionSettings =  
    class
        interface INotifyPropertyChanged
        interface ICloneable
    end

Remarks

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

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

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

    //Rows in the collection should be in order
    grid.SettingsSelection.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();
}

Inheritance Hierarchy

System..::..Object
  Dapfor.Wpf.Controls..::..GridControlSelectionSettings

See Also