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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to keep one row always selected

Thread ID:





142595 Feb 11,2019 06:44 PM UTC Feb 13,2019 04:17 AM UTC React - EJ 2 3
Tags: Grid
Ryan Ngoh
Asked On February 11, 2019 06:44 PM UTC

I am using selection mode single and want to always have one row selected. I have persistSelection: true on selectionSettings but when I have a row already selected and click on another row, it does not select the new row. There are no rows selected. How do I select rows properly with persistSelection true?

Pavithra Subramaniyam [Syncfusion]
Replied On February 12, 2019 06:11 AM UTC

Hi Ryan, 

Greetings from Syncfusion. 

Query: I have a row already selected and click on another row, it does not select the new row. There are no rows selected. 

We have analyzed your query and for your requirement, multiple type selection or checkbox selection has to be enabled to use the persistSelection property by default. So in the below sample, we have achieved your requirement by using the rowSelecting method of the grid to have only one row selected. Please refer to the below sample for your reference, 

Code Example:  


Sample               : https://stackblitz.com/edit/react-zylwjt?file=index.js  

Please get back to us for further assistance. 

Pavithra S. 

Ryan Ngoh
Replied On February 12, 2019 05:06 PM UTC


Pavithra Subramaniyam [Syncfusion]
Replied On February 13, 2019 04:17 AM UTC

Hi Ryan,  

Thanks for your update.  

Please contact us if you need any further assistance. As always, we will be happy to assist you.  

Pavithra S. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon