Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7021469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:27:15+00:00 2026-05-27T23:27:15+00:00

In gridview control, am using RowEditingevent. I have created a command field to handle

  • 0

In gridview control, am using RowEditingevent. I have created a command field to handle insert, cancel and update.

Problem : When click edit (manage.jpg), it is not showing in edit mode. If I do one more click, on the same edit, it is showing data fields to edit. I do not understand why it is not responding for the first click event.

    <asp:CommandField 
           ShowEditButton="true"
           ShowCancelButton="True"
           ButtonType="Image" 
           EditImageUrl="manage.jpg"
           HeaderText="Edit" 
           UpdateImageUrl="insert.jpg" 
           CancelImageUrl="cancel.png"
           ItemStyle-Width="10px" >
           <ItemStyle Width="20px" Height="20px"></ItemStyle>
          </asp:CommandField>

    protected void gridFavoriteAddress_RowEditing(object sender, GridViewEditEventArgs e)     {
        gridFavoriteAddress.EditIndex = e.NewEditIndex;
        //gridFavoriteAddress.DataBind();
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:27:15+00:00Added an answer on May 27, 2026 at 11:27 pm

    Just some thoughts

    1. When you click on edit the first time does that rebind the grid before the edit event has fired. I have known that disturb the event model

    2. Try adding CausesValidation="false" to the Command field just in case some failed validation is blockng it the first time through

    3. Try recoding it to use an ImageButton with a CommandName="Edit" in a TemplateColumn. This should also fire the row editing event. Does that one work?

    4. This is mad – but you’ve got conflicting styles (widths) in the command button. I would just remove. I know it couldn’t possibly cause it but I would just make sure everything is exactly as it should be when going through this

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using an ASP.NET GridView control, created dynamically with C# on a SharePoint
I am using the ASP.NET3.5 gridview control in a new project. My problem is
Using asp.net 3.5 Gridview control, visual studio 2008. I have played with all the
I am facing a strange problem when using the gridview control in ASP.NET. I
I have an ASP.NET gridview I want to manipulate using JavaScript/JQuery. The problem I
I have an ASP.NET GridView control with two asp:CommandField columns that are both using
I am using C#, .NET 3.5. I have a GridView control with dynamically bound
I have a gridview control inside another gridview control. When I click on the
Hi I need help implementing a logic using Gridview control in c#. I have
I have a hyperlinkfield in Gridview control. I am using the below shown stylesheet

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.