0

I have a gridview on a web page. I wanted to maintain the scroll position everytime it postbacks after sorting gridview. I have included MaintainScrollPositionOnPostback attribute in the page directive, also included below in Page_load

Page.MaintainScrollPositionOnPostback = true 

But it does not work.After post back it always goes to the top of the page. Am I missing anything?

Manali
  • 53
  • 7

1 Answers1

0

One solution would be to use your gridview inside update panel as mentioned here-

Maintain horizontal and vertical ScrollPosition on Postback in ASP.NET

MBB
  • 1,635
  • 3
  • 9
  • 19