DataGrid edit events fire twice

Discussion in 'ASP .Net' started by David Rose, Dec 14, 2003.

  1. David Rose

    David Rose Guest

    I have noticed that when I use an asp:TemplateColumn (with an ItemTemplate
    and an EditItemTemplate) to edit a row in the DataGrid that the EditCommand,
    CancelCommand and UpdateCommand handlers fire 2 times for each click.

    Is this the normal behavior? If not, what could be causing it?

    Thanks.

    David Rose
     
    David Rose, Dec 14, 2003
    #1
    1. Advertising

  2. David Rose

    Microsoft Guest

    You need to rebind the datagrid after setting the EditItemIndex property.

    "David Rose" <> wrote in message
    news:...
    > I have noticed that when I use an asp:TemplateColumn (with an ItemTemplate
    > and an EditItemTemplate) to edit a row in the DataGrid that the

    EditCommand,
    > CancelCommand and UpdateCommand handlers fire 2 times for each click.
    >
    > Is this the normal behavior? If not, what could be causing it?
    >
    > Thanks.
    >
    > David Rose
    >
    >
    >
    >
     
    Microsoft, Jan 13, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Schultz
    Replies:
    3
    Views:
    568
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Feb 14, 2005
  2. =?Utf-8?B?SmViQnVzaGVsbA==?=

    Need To Click Edit Button Twice On Datagrid

    =?Utf-8?B?SmViQnVzaGVsbA==?=, Oct 14, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    604
    =?Utf-8?B?SmViQnVzaGVsbA==?=
    Oct 15, 2005
  3. dilbert
    Replies:
    0
    Views:
    470
    dilbert
    Jan 28, 2008
  4. dilbert
    Replies:
    0
    Views:
    454
    dilbert
    Jan 28, 2008
  5. Jaime Stuardo

    GridView control enters edit mode when I click Edit link twice

    Jaime Stuardo, Apr 7, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    403
    Jaime Stuardo
    Apr 7, 2006
Loading...

Share This Page