treeview control not expand until reload

N

nextman

Has anyone found that their asp.net treeview control initially fails
to expand when you first click on a crosshair? The page reloads and it
then any further clicks activate the control correctly.

It appears to be a bug because it only seems to affect some nodes but
it always occurs in some form or other.

Any help much appreciated

Rob
 
N

nextman

Further scouring of the newsgroups suggests that this is related to
having large treeviews which require scrolling to navigate. The
problem does not occur on any nodes at the top, and even when I've
scrolled a "little bit" it is still ok.

Some people have suggested fixing the height style of the treeview but
this has not worked.

Does anyone know if this is preventable? I would also be grateful if
someone could tell me if it is not and I can get on with something I
can make work!

Rob
 
N

nextman

I have found the solution to this problem!

It turns out that this is a curious bug with the TreeView control
which only occurs when scrollbars are on the page somewhere.

The solution was found by a guy called Fabdi on the ASP.Net forums:

Open the treeviw.htc file in:

C:\Inetpub\wwwroot\webctrl_client\1_0

Find the code:

// Add anchor tag
elAnchor = el.document.createElement("<A>");
elAnchor.onclick = nodePlusMinusClick;

and replace with:

// Add anchor tag
elAnchor = el.document.createElement("<A>");
elAnchor.onclick = nodePlusMinusClick;
//BUGFIX: plus minus need the onmousedown event, too
elAnchor.onmousedown = mousedown;
elAnchor.onmouseup = mouseup;

And you done.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top