EditCommandColumn

Discussion in 'ASP .Net Datagrid Control' started by Vanessa Berni, Sep 15, 2003.

  1. Hi,
    in the codebehind I've created a datagrid and I've added an
    EditCommandColumn


    Dim EditCol As New EditCommandColumn
    EditCol.EditText = "Edit"

    EditCol.UpdateText = "Update"

    EditCol.CancelText = "Cancel"

    EditCol.HeaderText = "Modifica"

    myDataGrid.Columns.Add(EditCol)

    AddHandler myDataGrid.EditCommand, AddressOf Me.dg_Edit
    AddHandler myDataGrid.UpdateCommand, AddressOf Me.dg_Update

    AddHandler myDataGrid.CancelCommand, AddressOf Me.dg_Cancel

    The problem is that every time (if a click the "update or delete link") I
    got the EditCommand event instead of the UpdateCommand or CancelCommand.

    Why?!?!?!



    Thanks Vanessa
     
    Vanessa Berni, Sep 15, 2003
    #1
    1. Advertising

  2. Vanessa Berni

    TY.Ng Guest

    vanessa,

    can u post your page load, edit, update and cancel event handling methods?


    --
    TY.Ng
    www.rainforestnet.com


    "Vanessa Berni" <> wrote in message
    news:...
    > Hi,
    > in the codebehind I've created a datagrid and I've added an
    > EditCommandColumn
    >
    >
    > Dim EditCol As New EditCommandColumn
    > EditCol.EditText = "Edit"
    >
    > EditCol.UpdateText = "Update"
    >
    > EditCol.CancelText = "Cancel"
    >
    > EditCol.HeaderText = "Modifica"
    >
    > myDataGrid.Columns.Add(EditCol)
    >
    > AddHandler myDataGrid.EditCommand, AddressOf Me.dg_Edit
    > AddHandler myDataGrid.UpdateCommand, AddressOf Me.dg_Update
    >
    > AddHandler myDataGrid.CancelCommand, AddressOf Me.dg_Cancel
    >
    > The problem is that every time (if a click the "update or delete link") I
    > got the EditCommand event instead of the UpdateCommand or CancelCommand.
    >
    > Why?!?!?!
    >
    >
    >
    > Thanks Vanessa
    >
    >
     
    TY.Ng, Oct 9, 2003
    #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. RobS

    EditCommandColumn validation

    RobS, Dec 8, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    1,403
    Peter Blum
    Dec 11, 2003
  2. Rick
    Replies:
    1
    Views:
    472
    Richard Ryerson
    Feb 2, 2004
  3. Richard Ryerson
    Replies:
    0
    Views:
    2,630
    Richard Ryerson
    Jan 28, 2004
  4. George Durzi

    CausesValidation of editcommandcolumn

    George Durzi, Feb 12, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    973
    George Durzi
    Feb 12, 2004
  5. angus
    Replies:
    1
    Views:
    529
    angus
    May 14, 2004
Loading...

Share This Page