|
Rank: Newbie Groups: Member
Joined: 6/5/2011 Posts: 6
|
Hi,
I am using your controls a few days. Thanks much for such objects.
Grid: I am setting AllowColumnReorder = true and the end user can reorder columns. That's OK.
To "remember" the new order by the next visit of the user, I am saving the "index" property of the column, to the cookies. That's OK, too.
But by "remembering" I can not set "index", because it's read only.
Does the grid have a functionality to "remember" colum norder ? Or Can you advise me about "remembering column order" ?
Thanks in advance.
Hakan Ozay
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, You don't need to do anything special to remember column order. The Grid will automatically remember it for you. See here for a working example: http://demo.essentialobjects.com/Demos/Grid/Features/Column%20Reordering/Demo.aspxThanks!
|
|
Rank: Newbie Groups: Member
Joined: 6/5/2011 Posts: 6
|
Hi,
I am aware of the the demo page you linked for me.
Grid "remember"s the index columns are in the changed order after POSTBACK.
But I need to "remember" the column order by the NEXT VISIT (next session) of the user, NOT in the same visit.
Therefore, I am saving the user-changed-column-order (index properties of the columns) to COOKIES in the users computer.
By the NEXT VISIT, I can remember the order from COOKIES, but I can not SET them by the grid, because the index property is read-only.
Does the grid have a functionality to "remember" column order by the NEXT VISIT? Or Can you advise me about "remembering column order" by the NEXT VISIT ?
Thanks.
Hakan
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
No. Like most server control, the Grid does not save state information beyond page. If you wish to save the new order, you will need to dynamically create all columns based on your saved data. Usually you would do it inside your Page_Init event so that it will be ready for any further changes made by view state.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 6/5/2011 Posts: 6
|
Thanks. I will do that.
Hakan
|
|