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

Two Delete CommandName buttons

1 Answer 36 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jessica
Top achievements
Rank 1
Jessica asked on 03 Aug 2010, 07:16 PM
My application currently has a RadGrid that is connected to a database with additional two GridButtonColumns.  Both of the buttons have 'Delete' commandNames so they both access the same class when the delete command bubbles.  I wanted them to access seperate classes based on which button they will click. 
Does anyone have any ideas I am currently stuck.
Thank you!
Jessica

1 Answer, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 06 Aug 2010, 08:12 AM
Hi Jessica,

You can set different values for the CommandName property of each button column (the Text property can stay "Delete" for both of them) and intercept RadGrid's ItemCommand event. In there you can check through the event arguments object which command is coming ( e.g., if (e.CommandName == "ButtonColumn1Cmd") {...} ) and perform your business logic accordingly.

Hope it helps.

Regards,
Tsvetoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Jessica
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Share this question
or