AJAX How-to: Scroll to the top of a Page when clicking on only the Pager Controls in DataView

abstracts:

AJAX How-to: Scroll to the top of a Page when clicking on only the Pager Controls in DataView

Today I figured out how to Scroll back to the top of a Page when one of my users click on the Pager Controls at the bottom of a Page. I wanted all of the other AJAX postbacks to not scroll, but I did want the postbacks to scroll to the top when the pager controls were clicked. The pager control's client ID's are not set, so the postbackElement ID is set equal to the DataView, so knowing that information you can use the PageRequestManager to scroll to the top only if the the pager controls are clicked. (This works for both the Top and Bottom Pager controls):


Filed under: .NET, C#, atlas, ajax, ASP.NET Ajax, AutoScroll, Dataview

Click here to visit original site

No comments:

Post a Comment