Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > TreeView Problem - Setting focus on current Node causes scrolling

Reply
Thread Tools

TreeView Problem - Setting focus on current Node causes scrolling

 
 
Chris van Renen
Guest
Posts: n/a
 
      06-13-2005
Hi,

I recently had a problem with the TreeView control as it kept jumping
(setting focus) to the currently selected Node in the TreeView which causes a
problem when that Node is not currently displayed on screen. In other words,
when I try to right click (I use my own context menu) on the TreeView and the
currently selected Node is not on screen, it scrolls down/up to that Node
(setting the focus) and my context menu is not displayed.

I had a look at the Javascript functions in the treeview.htc file and had to
change a few lines to solve my problem. I changed the dofocus() function to
accept a boolean parameter(eg. dofocus(setFocus)). I then changed the
dofocus() call in the ondocumentready() function to supply a true parameter
so that the initial focus is set on the page load. In the dofocus() function,
I just do a check to see if the focus should be set on the element or not.

Does anyone know if there is another way of doing this or am I on the right
track? If so, I hope this will be in the next version of Webcontrols.

Kind Regards,
Chris van Renen
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
xsl variable $node/text() but $node can non-node-set help! Tjerk Wolterink XML 2 08-24-2006 03:28 AM
Selecting Treeview node causes repaint - sometimes chris ASP .Net Web Controls 0 07-08-2006 07:33 AM
How to set the node indent property between the parent node and the leaf node viveknatani@gmail.com ASP .Net 0 02-13-2006 07:11 PM
How to drag a sub-node to another node in TreeView? wolf ASP .Net 0 08-18-2004 11:51 PM
treeview causes screen repaint every node clicked :( Jason Shohet ASP .Net 2 11-19-2003 02:42 PM



Advertisments