[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 442
  • Last Modified:

Gridview does not maintain row position after clicking edit

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
MzKitty
Asked:
MzKitty
1 Solution
 
MzKittyAuthor Commented:
I took the panel out of it so and that fixed it.
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now