Is there an easy way to have the row selected that the GridButtonColumn was pressed in?
5 Answers, 1 is accepted
Please try the following code snippet to select a row on GridButtonColumn click.
I tried also this solution. Works fine for the 1st click. The 2nd click in another row doesn't work. I found out that if I click in the same row of the 1st click the row is deselected and then I can click in another row which is then selected.
Do you have an idea what is wrong?
I have assembled a sample project using the suggested approach. The items are selected as expected on my end. I am attaching the project as reference. Please give it a try and see how it works for you.
Can't I get the row index on GridButtonColumn click without firing an ItemDataBound or ItemCreated handlers ?
I tried to do this using ItemDataBound event, It worked well for update commands but when I insert a new item to the RadGrid, and then click on the GridButtonColumn, I loose unsaved data in the RadGrid (Batch).
What can do to resolve this issue ?
Thanks for the help !
If you would like to add confirm message when Batch Editing you can use a GridClientDeleteColumn. It enables you to prompt the user before deleting a record.