Maintain Scrolling position or current focus on gridview row editing event in asp.net

We are continuously sharing best and important article that can help to short out your asp.net problems. Today we come with another best article that will surely help you while using Gridview Control. Gridview is best Data Control for display data in asp.net. You can use AutoGenerateColumns=true to bind Gridview without declare any columns in it. We will discuss about different between gridview, repeater and formview. In this article we discuss important issue that might face whenever we use gridview.

When we have binding large data to gridview we can not show it directly, it may increase page size. To come over this problem we either use scroll or paging. In both condition when we fire bubble events like edit, update or delete , we can not maintain scroll of GridView. Our Page bring us on top when any bubble fire by user.

To Focus on RowEditing Event or maintain scroll while RowEditing you must add MaintainScrollPositionOnPostback="true" on page directives.Example