Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom Control(Rendering a Datagrid)

Status
Not open for further replies.

sunila7

Technical User
Joined
Apr 11, 2001
Messages
1,087
Location
US
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.

Code:
this._datagrid.ItemCommand  += new DataGridCommandEventHandler(this._datagrid_DeleteCommand);
But, when clicked the ItemCommand event is not called.



Sunil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top