This is a migrated thread and some comments may be shown as answers.

DeleteCommand event not firing

1 Answer 69 Views
Grid
This is a migrated thread and some comments may be shown as answers.
David Sitton
Top achievements
Rank 1
David Sitton asked on 28 Aug 2008, 04:12 PM
Hi,

I have built a grid dynamically including the following button column...
...

GridButtonColumn buttonColumn = new GridButtonColumn();

buttonColumn.ButtonType =

GridButtonColumnType.ImageButton;

buttonColumn.ImageUrl =

"~/images/delete.png";

buttonColumn.CommandName =

"Delete";

buttonColumn.UniqueName =

"deleteColumn";

buttonColumn.HeaderStyle.Width = 16;

buttonColumn.ConfirmText = (

"Confirm Delete");

buttonColumn.ConfirmTitle =

"Delete Item";

RadGrid1.Columns.Add(buttonColumn);

....

and then added 
...
RadGrid1.DeleteCommand += new GridCommandEventHandler(RadGrid1_DeleteCommand);
...

I have the setup the event as follows...

protected
void RadGrid1_DeleteCommand(object source, GridCommandEventArgs e)

{
    Code here...

}

However, when I run up the application and click on the delete button in the grid, it never reaches the DeleteCommand event, it just does a postback. Please can someone help with this.

Many thanks
Dave

1 Answer, 1 is accepted

Sort by
0
Missing User
answered on 28 Aug 2008, 04:30 PM
Hi David Sitton,


Please find attached the sample web application that demonstrates the needed approach.

Best wishes,
Plamen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
David Sitton
Top achievements
Rank 1
Answers by
Missing User
Share this question
or