0

I have a gridview that contains an 'edit' command button.
The problem is that when I click the this 'edit' command button it does not work from the first time,I must click it 2 times to enable edit mode.
I want help to make it enable edit mode from the first time.
I am using VS.NET 2005.

this is the code that I am using to enable editing mode:

 protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
    {
        GridView1.EditIndex = e.NewEditIndex;
    }

Thanks in advace.

Edited by Nick Evan: Fixed formatting

5
Contributors
5
Replies
6
Views
9 Years
Discussion Span
Last Post by aspking
0

I think you are binding the gridview inside a IF not ISPOSTBACK ----END IF code in Page Load.

Paste it outside this on Page Load.

This should do the trick.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.