Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Gridview does not maintain row position after clicking edit

Posted on 2012-03-16
1
Medium Priority
?
441 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

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

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

618 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