I have being trying to source a solutions to this problem. On page load if you bind a treeview to a datasource control you cannot find any nodes in the tree until after the page has finished loading. To late to do anything now. I need to load the treeview
dynamically from a database dataset (not XML) then re-select any nodes that the user had selected the last time this page was edited in a previous session or another user. I know this is possible, but I can find no references anywhere on how they accomplish
this. Poining me to a good reference would be very helpful
So what I mean? I mean that we can add a new field called isDisplay to ParentTable and ChildTable, and now we can use likes this SQL statement to get the datasource and bind it to the TreeView control,
select * tablename where isDisplay = '1'
So, now we just need to update the status of the field of isDisplay each time to solve this issure.
Spirit
Member
235 Points
51 Posts
Binding selected items to a Treeview on Page Load
Mar 05, 2009 02:15 PM|LINK
I have being trying to source a solutions to this problem. On page load if you bind a treeview to a datasource control you cannot find any nodes in the tree until after the page has finished loading. To late to do anything now. I need to load the treeview dynamically from a database dataset (not XML) then re-select any nodes that the user had selected the last time this page was edited in a previous session or another user. I know this is possible, but I can find no references anywhere on how they accomplish this. Poining me to a good reference would be very helpful
Thanx
treeview
Hong-Gang Ch...
All-Star
74695 Points
6768 Posts
Re: Binding selected items to a Treeview on Page Load
Mar 10, 2009 07:07 AM|LINK
Hi Spirit,
Please check this article in advance,
http://69.10.233.10/KB/aspnet/FillTreeView.aspx
and see the below illustrators,
ChildTable
2-Add some data
ParentTable
ChildTable
So what I mean? I mean that we can add a new field called isDisplay to ParentTable and ChildTable, and now we can use likes this SQL statement to get the datasource and bind it to the TreeView control,
select * tablename where isDisplay = '1'
So, now we just need to update the status of the field of isDisplay each time to solve this issure.
If you have any feedback about my replies,please contactmsdnmg@microsoft.com.
Microsoft One Code Framework