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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to allow selection of just one row

Thread ID:

Created:

Updated:

Platform:

Replies:

123996 May 6,2016 06:31 AM UTC May 9,2016 09:54 AM UTC WPF 1
loading
Tags: GridTreeControl
Craig Greenway
Asked On May 6, 2016 06:31 AM UTC

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?

Srinivasan Vasu [Syncfusion]
Replied On 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 
 



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;