If you want to retain the focus on the same UI control after PostBack, set SmartNavigation attribute of Page directive to TRUE.
Thanks
Hi - thanks for reply,
The thing is the scroll bars are in a div control, not on the page itself. I think SmartNavigation only preserves the page scroll position. Can you help with this?
Hello,
just to set SmartNavigation to 'True' would not be enough in some cases especially if you use a long datagrid without paging or even a <div>or<textarea>-tag for example.
If you really want to maintain the focus after a postback then you should have a look the following post:view post 312559.
In this post, Jim has announced a new article in which he has described how to maintain the position in a <div>tag after a postback.
Additionally you will find a link to the newest version of 'SmartScroller' web control in this thread which also definitely provide a way to maintain the focus after a postback.
Check it out...the article is worth to read and the web server control is worth to try it...
HTH,
Hi - thanks very much for taking the time to reply.
The thing is I have actually already read that article and downloaded the SmartScroller. Both solutions have worked really well, the SmartScroller is great. But what I want to do now is not to maintain the current scroll position but to actually put the scroll all the way down to the bottom after a postback. The reason is, I've got a datagrid inside, and when the user clicks for a new new I want the scroller to be in position when the new row appears at the bottom :)
Thanks for the generous attention
0 comments:
Post a Comment