Setting Focus on GridView and Maintaining ScrollPosition

Hai

I have a grid within a div. As per my functionality, I add a new row to the grid. On the click of a button, a new row Iin edit mode) is added to the bottom of the grid. This new row now could be seen only on scrolling down the grid. Now on the click of the button, I want to have the focus on that new editable row of the grid.

Another issue with the same is I have two dropdwonlists in that row which on selecting an item results in postback and the scroll postion is not maintained ( remember this row is at the end of the grid) so I have to again scroll down. I had tried using MaintainScollPositionOnPostBack on Page_Init event, but in vain.

Can anyone tell me how to resolve the above issues?

Hameeda

[747 byte] By [AshrafHameedaT] at [2008-2-13]
# 1
set on web.config this line for all pages

<pages maintainScrollPositionOnPostBack="true">

or just add in @Page maintainScrollPositionOnPostBack="true"

about focusing GridView just call GridView.Focus();

Hope this helps

GalinIliev at 2007-9-10 > top of Msdn Tech,Feedback for forums and MSDN websites,Off-Topic Posts (Do Not Post Here)...
# 2

Hi!

I tried doing that but that takes on the Scroll Position of the Webpage. Do you have an idea how to get the scroll position of the Gridview table?

Thanks!

Tnybubble at 2007-9-10 > top of Msdn Tech,Feedback for forums and MSDN websites,Off-Topic Posts (Do Not Post Here)...
# 3

I have exactly the same problem as you. Have you found the solution.

If yes, Please let me know how to solve this one.

Thanks in advance,

Rajanikanth.

RajanikanthM at 2007-9-10 > top of Msdn Tech,Feedback for forums and MSDN websites,Off-Topic Posts (Do Not Post Here)...