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

Change dynamically grid settings


I have a question about multi selection in grid.

All of my grids are constructed with the same method with selectionSettings: { type: 'Multiple' },

But i would like some of my grids to have the selectionSettings to 'Single'. I only know how to get these grids by their ID but not how to change to single section.

How can i change dynamically this setting ?


3 Replies

VA Venkatesh Ayothi Raman Syncfusion Team November 9, 2018 05:58 AM UTC

Hi David, 

Thanks for using Syncfusion products. 

Yes, we can change the selection settings dynamically for different grids using selectionSettings property. Please refer to the following code example for your reference, 

Code example
    function buttonClick() { 
        var gridObj = document.getElementById('FlatGrid').ej2_instances[0]; 
        gridObj.selectionSettings.type = 'Single'; //change the selection settings for particular grid component 

Also, we can dynamically change the selection type using setProperties method. Please refer to the following code example, 

function buttonClick() { 
        var gridObj = document.getElementById('FlatGrid').ej2_instances[0];//get the grid instance 
        gridObj.setProperties({ selectionSettings: { type: 'Single' } }, false); //dynamically the change the selection type for particular grid component using set properties method 

Venkatesh Ayothiraman. 

DC David Caraiannis November 9, 2018 10:01 AM UTC


It worked great. Thank you.


MS Madhu Sudhanan P Syncfusion Team November 12, 2018 04:47 AM UTC

Hi David, 
We are glad that the requirement has been achieved. 
Madhu Sudhanan P 

Live Chat Icon For mobile
Up arrow icon