Treeview checkbox control critical problem

E

Eilsa

Dear all,

I have an treeview control with checkbox control. However, when I try to
check the checkbox everytime, the web page always jump to the top of the
page. Who can tell me what's wrong is it?


Thanks
 
T

Tronex

Hi Eilsa,

you probably set the AutoPostBack property of the TreeView control to true
which means, that on every event, a postback event is generated and the page
reloads. The advantage is, that you are able to handle events then on server
side.

The drawback is, that on a postback, the scrolling position is resetted as
well as the focus and different other things.

One work-around is trying to set the SmartNavigation property of your
document to true. This will keep the scrolling position as well as the focus
and ... different other things. ;-) Keep in mind: This works only for MS
Internet Explorer 5.0+

Also, SmartNavigation will result in problems when using https and
redirections.

Hope I could help.
 
E

Eilsa

I haven't use AutoPostBack and I've already use the SmartNavigation already.
However, the problem still exist at the first click on the treeview.
 
M

Mark D.

I have a similar problem to Eilsa, maybe the same.
I think it is a focus issue.

You click on a node, then scroll down in your treeview control so that
the node is no longer visible. Now instead of clicking on the node
you click on the associated checkbox and the treeview jumps back to
the previously selected node.

If I click on the node first and then the checkbox I do not have this
problem.

And the AutoPostBack property is set to False.

Thanks,
 

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

Forum statistics

Threads
473,776
Messages
2,569,602
Members
45,182
Latest member
BettinaPol

Latest Threads

Top