This is a migrated thread and some comments may be shown as answers.

[Solved] Save Grid Layout

1 Answer 43 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Chai
Top achievements
Rank 1
Chai asked on 04 Nov 2011, 07:38 PM
Hi,

Is there a way to say the grid layout (colunm order, size, etc)?

Thanks,
Chai

1 Answer, 1 is accepted

Sort by
0
James
Top achievements
Rank 1
answered on 04 Nov 2011, 09:29 PM
I don't think there is any built-in way to save the state of a grid, but I have given some thought to this because I may need this functionality in the future.  The (extremely tentative) solution I've come up with in my head is to monitor all the events that happen when a user sorts, filters, reorders, groups, etc., and when they trigger, come up with some kind of object to store all this information, then serialize that object into a JSON string (or some other serialization, JSON is easiest to work with for me), and then re-apply those "settings" when the grid is retrieved.

Again, all of this is just a concept I've thought about, no actual work has been done and no code has been written.  Just my thought process.  Maybe it will help you find something that works.  :)
Tags
Grid
Asked by
Chai
Top achievements
Rank 1
Answers by
James
Top achievements
Rank 1
Share this question
or