473,320 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

gridview displaying wrong row when editing

The gridview rebinds data before the RowCommand or RowEditing events fire.
So, if a new record is added to the underlying datasource that changes the
index of the row you are trying to edit, you get the wrong row displayed for
editing. I am guessing same is true when deleting which is even worse,
especially if you are not confirming on delete.

How do I either force the gridview not to rebind the data when edit is
selected or force the grid to pass the correct index for the row to be edited
using datakeys perhaps.
--
Miller Lite - Tastes Great...Less Filling
Sep 14 '06 #1
0 1266

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jim Katz | last post by:
I have an application that updates a strongly typed data set at run time. I'd like to dynamically create a table that connects to a run time data table. For displaying the data, this works well. ...
4
by: Dabbler | last post by:
I have two tables I'm editing in a Gridview. The VANS table contains a key to the other LESSOR table. I would like to use a dropdown list to select the LessorId value while displaying the Lessor...
2
by: Dabbler | last post by:
What's the best way to return to GridView after editing a detail record in a FormView so the GridView shows the page with the edited record on it? I'm using GridView with standard...
1
by: CorporateCoder | last post by:
Hi, I am trying to bind the selected value of a databound dropdown box in a databound gridview control to the value being displayed in the template column the dropdown box has been added to. ...
0
by: JMax | last post by:
Hello! I have a GridView that has another GridView embedded in it. The embedded GridView has some complex editing features (requiring JavaScript duplicating drop down lists), so I have to use...
2
by: Greg | last post by:
Hello, I am trying to bind a GridView to a custom object I have created. First, here is what I'm trying to do: I have a wizard for adding/editing Users. When the wizard begins, a User...
4
by: Tomasz Jastrzebski | last post by:
Hello Everyone, I have a GridView control bound to a plain DataTable object. AutoGenerateEditButton is set to true, Edit button gets displayed, and RowEditing event fires as expected.
1
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
Hi, I have a gridview which I added a <asp:CommandField EditText="E" CancelText="C" UpdateText="U" ButtonType="Link" ShowEditButton="True" /> my gridview looks like this <asp:GridView...
3
by: Polaris | last post by:
Hi Experts: I'm using asp.net 2.0 with Visual Studio 2005. I'm trying to use the GridView to display data. I need to programmatically add rows into the GridView. So far could not find a way...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.