Articles in this section
Category / Section

How to set Extended SelectionMode in WPF GridControl to select a row when user click a cell?

1 min read

Row selection in GridControl can be enabled by setting the GridControl.Model.Options.AllowSelection property as Row. The selection mode can be controlled to select single or multiple rows can be controlled by setting GridControl.Model.Options.ListBoxSelectionMode property. To selection multiple rows, set this property as GridSelectionMode.MultiExtended.

C#

grid.Model.Options.AllowSelection = GridSelectionFlags.Row;
grid.Model.Options.ListBoxSelectionMode = GridSelectionMode.MultiExtended;

 

Multiple rows are selected in GridControl

 

User can select multi row by pressing SHITFT and CTRL keys using mouse or keyboard.

For example,

1. Select a data or record, hold down the SHIFT key and select fourth record. You can see all the records in between first and fourth records are also selected.

2. You can make random selection by holding down the CTRL key and selecting the rows using mouse.

3. You can select multiple records in keyboard also by pressing SHIFT key and select the records using the UP or DOWN arrow keys.

Refer this UG: https://help.syncfusion.com/wpf/gridcontrol/selection

Sample: View sample in GitHub

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied