Solved

Gridview does not maintain row position after clicking edit

Posted on 2012-03-16
1
430 Views
Last Modified: 2012-03-16
Hi. I have a gridview in a panel in an updatepanel and in a div on a webpage.  The user does not want paging in the gridview, so I have scroll controls in the panel.  When the I click Edit on the row I want to change, the gridview goes to the first row after the postback.

 I have set MaintainScrollPositionOnPostBack = True in the asp page :

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="InvCount.aspx.vb" Inherits="BuildingMaterials.InvCount" MaintainScrollPositionOnPostback="true"  %>

and in the SelectedIndexChanged sub:

Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles GridView1.SelectedIndexChanged

        GridView1.SelectedRow.Controls(0).Focus()
    End Sub

What else can I do?

Thanks,
Cathy
0
Comment
Question by:MzKitty
1 Comment
 

Accepted Solution

by:
MzKitty earned 0 total points
Comment Utility
I took the panel out of it so and that fixed it.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
WPF issue with Trigger 2 65
Whats wrong with this query 21 39
Windows Management Instrument 6 57
How to read XML file attributes... 17 40
Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now