EditCommandColumn event handling

Discussion in 'ASP .Net Datagrid Control' started by tantilis@gmail.com, Apr 22, 2005.

  1. Guest

    I am creating a datagrid programmatically and am trying to add an
    EditCommandColumn to the datagrid but I'm having a hard time getting
    events for this column to fire.

    Here's the code:

    Dim dg as New DataGrid()
    dg.AutoGenerateColumns = false
    AddHandler dg.EditCommand, AddressOf grid_edit
    AddHandler dg.UpdateCommand, AddressOf grid_update
    AddHandler dg.CancelCommand, AddressOf grid_cancel

    Dim editCol as new EditCommandColumn()
    editCol.EditText = "Edit"
    editCol.UpdateText = "Update"
    editCol.CancelText = "Cancel"
    dg.Columns.add(editCol)


    page.FindControl("pnlMainContent").controls.Add(dg)



    I'm just trying to get a trace warn out of the edit handler and just
    not getting anything indicating this sub ever executed:

    Public Sub grid_edit(sender As Object, e As
    DataGridCommandEventArgs)
    trace.warn("say something you bastard")
    End Sub


    Any advice would be greatly appreciated,

    Thanks in advance.
     
    , Apr 22, 2005
    #1
    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,409
    Peter Blum
    Dec 11, 2003
  2. Rick
    Replies:
    1
    Views:
    492
    Richard Ryerson
    Feb 2, 2004
  3. Richard Ryerson
    Replies:
    0
    Views:
    2,647
    Richard Ryerson
    Jan 28, 2004
  4. George Durzi

    CausesValidation of editcommandcolumn

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

Share This Page