Welcome Guest Search | Active Topics | Sign In | Register

Save Grid ColumnOrder Options
Hakan Özay
Posted: Sunday, June 12, 2011 4:58:38 AM
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
eo_support
Posted: Monday, June 13, 2011 8:21:51 AM
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.aspx

Thanks!
Hakan Özay
Posted: Monday, June 13, 2011 10:55:04 AM
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

eo_support
Posted: Monday, June 13, 2011 11:09:12 AM
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!
Hakan Özay
Posted: Monday, June 13, 2011 12:12:58 PM
Rank: Newbie
Groups: Member

Joined: 6/5/2011
Posts: 6
Thanks. I will do that.

Hakan


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.