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

Getting customized display

Thread ID:

Created:

Updated:

Platform:

Replies:

145232 Jun 13,2019 08:41 AM UTC Jun 17,2019 08:38 AM UTC JavaScript - EJ 2 1
loading
Tags: Grid
thibault fouillat
Asked On June 13, 2019 08:41 AM UTC

Hello,

I would like to know if it is possible to get the display settings after a user change columns visibility, order or columns width?

With the columnDrop method, I can have the moved column but not its order in the column list. I also tried the getColumns method but the order is from the first generation of the grid and doesn't take the changed order by the user.

I need to save these custom settings so I need to retrieve all data that users modify (visibility, order, and width).

Is there a way to do that?

Regards

Pavithra Subramaniyam [Syncfusion]
Replied On June 17, 2019 08:38 AM UTC

Hi thibault, 

Thanks for contacting Syncfusion support. 

We have analyzed your requirement. We suggest you to use the “getColumns()” method of Grid to get entire Grid column’s settings after you perform reordering or set visibility or set width for the columns. This method will return the proper updated settings for the Grid’s columns. As the reorder action will not get completed in the “columnDrop” event, the column settings were not updated properly in this handler. So we suggest you to call the “getColumns()” method in the timeout of the columnDrop event to get the updated setting in that event. 
 
            columnDrop:function(args){ 
              setTimeout(function(args){ 
                var obj = document.getElementById("Grid").ej2_instances[0] 
                obj.getColumns() 
              },0) 
            }, 
 
 
If you dynamically change the width for the column, then you need to call the “refershColumns()” method to have the changes applied to Grid column’s width. 
Documentations :  

Please get back to us if you need further assistance. 
 
Regards, 
Pavithra S. 
 


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