Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > EditCommandColumn event handling

Thread Tools

EditCommandColumn event handling
Posts: n/a
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"

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
trace.warn("say something you bastard")
End Sub

Any advice would be greatly appreciated,

Thanks in advance.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
<asp:EditCommandColumn/> bugs in PushButton? angus ASP .Net 1 05-14-2004 09:51 AM
CausesValidation of editcommandcolumn George Durzi ASP .Net 1 02-12-2004 02:40 AM
DataGrid EditCommandColumn not firing events properly. Rick ASP .Net 1 02-02-2004 05:03 AM
DataGrid EditCommandColumn not firing events properly. Richard Ryerson ASP .Net 0 01-28-2004 06:50 PM
EditCommandColumn validation RobS ASP .Net 4 12-11-2003 03:51 PM