I am using Visual Studio Express 2103 for web. On my asp page I have a Treeview with 4 Levels. From sql server I load the hierarchy as
TopLevel-->
Product-->
Keyword-->
Article
User would click on product, then view a list of all keywords, click on the keyword and then see a list of all articles with this keyword, when the article is clicked, the related information will be shown in various text boxes to the right of the tree.
The problem I have is that when I scroll down the list on my web page, and click any nodes that are more than 1 page down, the focus (for lack of a better word) jumps to the top of the page, now I have to scroll all the way down to the node clicked.
How can I prevent all of this scrolling and keep the focus on the last clicked node, whether it is on the first or the tenth page.
Member
1 Points
2 Posts
Treeview, keep focus on clicked node ?
Aug 16, 2014 05:09 PM|AndreU7|LINK
I am using Visual Studio Express 2103 for web. On my asp page I have a Treeview with 4 Levels. From sql server I load the hierarchy as
TopLevel-->
Product-->
Keyword-->
Article
User would click on product, then view a list of all keywords, click on the keyword and then see a list of all articles with this keyword, when the article is clicked, the related information will be shown in various text boxes to the right of the tree.
The problem I have is that when I scroll down the list on my web page, and click any nodes that are more than 1 page down, the focus (for lack of a better word) jumps to the top of the page, now I have to scroll all the way down to the node clicked.
How can I prevent all of this scrolling and keep the focus on the last clicked node, whether it is on the first or the tenth page.
Thank you in advance.
</div>All-Star
101931 Points
20703 Posts
Re: Treeview, keep focus on clicked node ?
Aug 16, 2014 05:32 PM|MetalAsp.Net|LINK
Not sure if it'll work but try setting maintainscrollpositiononpostback to true.
Refer: http://msdn.microsoft.com/en-us/library/system.web.ui.page.maintainscrollpositiononpostback(v=vs.110).aspx
Member
1 Points
2 Posts
Re: Treeview, keep focus on clicked node ?
Aug 17, 2014 03:43 PM|AndreU7|LINK
Thanks, that solves my scrolling problem