KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Is it possible to make the column position configurable based on the the user #1614

Open vasim walikar opened this topic on on Sep 10, 2020 - 6 comments

vasim walikar commented on Sep 10, 2020

Is it possible to make the column position configurable based on the the user

https://prnt.sc/uf1b2x

David Winterburn commented on Sep 11, 2020

Hi Vasim,

Did you mean column reordering by users by any chance?

vasim walikar commented on Sep 11, 2020

yes

David Winterburn commented on Sep 11, 2020

Hi Vasim,

If you use the latest Datagrid package, its DataTables widget supports column reordering by default. Please try it and let us know if you have any difficulty. Thanks!

vasim walikar commented on Sep 11, 2020

Yes column reordering by default is exist in package, but we need to save this column order, which user can get back same column order even session destroid or page refreshed, i hope you got what we required

David Winterburn commented on Sep 11, 2020

Oh, that's quite a challenge. We don't have any on-the-plate solution to the task but I could give some guidance.

You still allow default column reordering with DataTables. Add a button saying "Save column order". When a user clicks the button you grab DataTables' columns' current order (DataTables api is really great). Then send a request (ajax, post, get, etc) to the server to save that column order for the user.

Later when the user opens the page again you could retrieve the their last saved column order and use it to construct the DataTables accordingly.

Let us know if you need help with any detail. Thanks!

vasim walikar commented on Sep 11, 2020

thank you

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed

DataGrid