0

I have multiple user controls with gridviews inside. The issue is whenever I scroll past the height of the window and click on edit for a row, the row being edited goes to the bottom of the page. I would like the page to maintain the scroll position wherever it was clicked.

The generic structure I have: default page > update panel > mulitview > view1 > user control1 > gridview


I have tried to add maintainScrollPositionOnPostBack = true to the default page but doesn't make a difference.

I have also tried to add an Update Panel around the gridview inside the user control but it won't detect the <AsyncPostBackTrigger ControlID="EditButton"> because the edit button is inside a Template Field.

Is there a way to keep the edit row in the same position where it was clicked? Any help is appreciated.

cjadd7
  • 123
  • 1
  • 7

1 Answers1

0

I found the issue thanks to the related questions on the right:

How to maintain scroll position of a page when add dynamic rows in GridView?

I had focus() on a textbox in edit mode...when I removed that, the scroll position stayed the same.

cjadd7
  • 123
  • 1
  • 7