T
tantilis
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.
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.