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:

150363 Jan 3,2020 10:55 AM UTC Jan 8,2020 05:55 AM UTC JavaScript - EJ 2 4
loading
Tags: Grid
Humanjo Daro
Asked On January 3, 2020 10:55 AM UTC

Hello everyone,,
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.

Indrajith Srinivasan [Syncfusion]
Replied On January 6, 2020 11:26 AM UTC

Hi Humanjo,  
  
Currently, we are validating the reported query and update further details on 7th January. 

Regards,
  
Indrajith 


Balaji Sekar [Syncfusion]
Replied On January 7, 2020 12:07 PM UTC

Hi Humanjo, 
 
Thanks for your patience. 
 
Yes. it is possible to get the display settings after a user change columns visibility, order or columns width. You can get the details in ActionComplete and ResizeStop events of the Grid. Please find the below code example and sample for more information. 
 
Index.ts 

 let data: Object = orderData.slice(015); 
    let grid: Grid = new Grid( 
        { 
            dataSource: data, 
            showColumnChooser: true, 
            toolbar: ['ColumnChooser'], 
            allowReordering: true, 
            allowResizing: true, 
            actionComplete: (args)=>{ 
            if (args.requestType === 'columnstate') { 
             console.log('Column Visiblity changed',args); 
              } 
            if (args.requestType === 'reorder') { 
             console.log('Column Order changed',grid.getColumns(), args); 
              } 
            }, 
            resizeStop : (e)=> { 
              console.log(e.column.field + ' column width changed to ' + e.column.width ); 
            }, 
. . . 
        }); 
    grid.appendTo('#Grid'); 

 
 
Regards, 
Balaji Sekar. 


Humanjo Daro
Replied On January 7, 2020 10:56 PM UTC

Hello everyone,,
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.

Thank you my issue has been solved,...

Dhivya Rajendran [Syncfusion]
Replied On January 8, 2020 05:55 AM UTC

Hi Humanjo, 
 
We are happy to hear that the provided solution was helpful to resolve the problem. Please get back to us if you need further assistance from us. 
 
Regards, 
R.Dhivya  


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