Is there an option that can be set to persist the expanded nodes during postback? My tree is set to load-on-demand with only the 1st level nodes being initially loaded. If the user expands several nodes and a postback occurs I want to be able to keep the grid in the same state after postback.
Hello Bob,
I have created a small sample with the behavior you are describing. I have a WebDataTree that binds to a XmlDataSource and a WebImageButton. The WebImageButton does a post back on click. When I run it I expand a few nodes and the click the WebImageButton to do a post back, the page refreshes and the WebDataTree remains in the state it was before the post back. If this is not the case in the project you are working on please check to see that EnableViewState and EnableAjaxViewState are set to true.
Please let me know if I may be of further assistance with this issue.
Sincerely,
Mike P.
Developer Support Engineer
Infragistics, Inc.
www.infragistics.com
I added EnableViewState and EnableAjaxViewState = true and it still doesn't work. On my page I have a button that posts back and gets a dataset (3 tables) , saves it to session variable and sets the datasource of the tree to the session variable and does a databind.. In Page_Load I set the datasource of the tree back to the session variable.
If I don't have the datasource set on page_load then none of the nodes ever get data when they try to expand.