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

Change dynamically grid settings

Thread ID:

Created:

Updated:

Platform:

Replies:

140827 Nov 8,2018 04:12 PM UTC Nov 12,2018 04:47 AM UTC ASP.NET MVC - EJ 2 3
loading
Tags: Grid
David Caraiannis
Asked On November 8, 2018 04:12 PM UTC

Hello,

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 ?

Regards,
David.

Venkatesh Ayothi Raman [Syncfusion]
Replied On 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
<script> 
 
    function buttonClick() { 
 
        var gridObj = document.getElementById('FlatGrid').ej2_instances[0]; 
        gridObj.selectionSettings.type = 'Single'; //change the selection settings for particular grid component 
    } 
</script> 


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 
    } 

Regards, 
Venkatesh Ayothiraman. 


David Caraiannis
Replied On November 9, 2018 10:01 AM UTC

Hi,

It worked great. Thank you.

Regards,
David.

Madhu Sudhanan P [Syncfusion]
Replied On November 12, 2018 04:47 AM UTC

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


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.

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