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

Save checkbox state

1 Answer 93 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Fit2Page asked on 05 Feb 2011, 03:48 PM
Hi,

For an application I have to save the treeview checked items state. When users navigate away from the page and they come back the state of the selection must be persisted. I try to do this to save the collection of the checked items in a cookie or a Session.Item

The Session.Item is set every time on the OnNodeCheck event.
When I come back I set the checked nodes from the Session.Item but i think every time I set a checkbox the OnNodeCheck event is fired. Is that correct? What would be the best approach to keep the Checked state in memory so I can reproduce the treeview correctly?

BR,
Marc

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 07 Feb 2011, 06:46 AM
Hi Marc,


Checkout the code library which might help in persisting the checkbox state after postback.
Persist Checked State after PostBack


-Shinu.
Tags
TreeView
Asked by
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Shinu
Top achievements
Rank 2
Share this question
or