G
Guest
I am using a dynamic datagrid and want to add the "delete" command,but no
matter what I try I cannot get it to work. This is what I have:
ButtonColumn del = new ButtonColumn();
del.Text = "deleteTest";
del.ButtonType = ButtonColumnType.LinkButton;
del.CommandName = "Delete";
DG.Columns.Add(del);
DG.ItemDataBound += new
System.Web.UI.WebControls.DataGridItemEventHandler(this.dgAssDealers_ItemDataBound);
DG.DeleteCommand += new
System.Web.UI.WebControls.DataGridCommandEventHandler(this.dgAssDealers_DeleteCommand);
The ItemDataBound works fine, but not the Delete. The button shows up in the
grid, but it's not "linked" , in other words, there's nothing to click. Has
anyone got any idea how to do this? I've been banging my head all weekend on
this and just cannot get it to work
matter what I try I cannot get it to work. This is what I have:
ButtonColumn del = new ButtonColumn();
del.Text = "deleteTest";
del.ButtonType = ButtonColumnType.LinkButton;
del.CommandName = "Delete";
DG.Columns.Add(del);
DG.ItemDataBound += new
System.Web.UI.WebControls.DataGridItemEventHandler(this.dgAssDealers_ItemDataBound);
DG.DeleteCommand += new
System.Web.UI.WebControls.DataGridCommandEventHandler(this.dgAssDealers_DeleteCommand);
The ItemDataBound works fine, but not the Delete. The button shows up in the
grid, but it's not "linked" , in other words, there's nothing to click. Has
anyone got any idea how to do this? I've been banging my head all weekend on
this and just cannot get it to work