1) I have a custom datagrid control class (inheriting from System.Web.UI.WebControls.WebControl).
In the constructor of this class i dynamically register the OnItemCommand for the grid.
2) I have another custom CustomHeaderTemplate class inheriting from ITemplate, which we are using to customize the column template for our custom DataGrid control. This template column is the first column in the grid, which displays an ImageButton. This button is used to delete a row in this custom control. The name of this button is "Delete".
3) I have this code which binds the ItemCommand event of the grid to _datagrid_DeleteCommand.
But, when clicked the ItemCommand event is not called.
Sunil
In the constructor of this class i dynamically register the OnItemCommand for the grid.
2) I have another custom CustomHeaderTemplate class inheriting from ITemplate, which we are using to customize the column template for our custom DataGrid control. This template column is the first column in the grid, which displays an ImageButton. This button is used to delete a row in this custom control. The name of this button is "Delete".
3) I have this code which binds the ItemCommand event of the grid to _datagrid_DeleteCommand.
Code:
this._datagrid.ItemCommand += new DataGridCommandEventHandler(this._datagrid_DeleteCommand);
Sunil