We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to allow selection of just one row

Hi, when I enable selection on a GridTree control, I can highlight multiple rows.  Disabling selection prevents this but then of course you don't get the necessary data in SelectionChange events.

How can you prevent selection of multiple rows in the GridTree please?

1 Reply

SV Srinivasan Vasu Syncfusion Team May 9, 2016 09:54 AM UTC

Hi Craig, 
 
Thanks for contacting Syncfusion support. 
 
We have analyzed your query and you can achieve your requirement using ListBoxSelectionMode property in GridTreeControl. Using this property, you can change the SelectionMode in GridTreeControl. 
 
Please refer the below code example. 
 
C# 
     this.treeGrid.EnableNodeSelection = true;               this.treeGrid.Model.Options.AllowSelection = GridSelectionFlags.Row; 
            this.treeGrid.Model.Options.ListBoxSelectionMode = GridSelectionMode.One;     
 
Please download sample from the below location. 
 
Sample Location: WPF 
 
Regards,
Srinivasan 
 



Loader.
Up arrow icon