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

EnablePostBackOnRowClick doesn't fire OnRowSelecting

1 Answer 101 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Fabian Schulz
Top achievements
Rank 1
Fabian Schulz asked on 20 Jun 2009, 08:22 PM
I want to achieve the following functionality in a RadGrid:
When the user clicks a row, it should post back to the server because I want to bind a second grid based on the selection in the first grid.
For example: Accounts and contacts. I selected an account and the contacts are displayed in the second grid.

This is working fine. Now I add a Button column with an edit button and this is where the problems begin. The event for onitemcommand is fired twice, first for the Button clicked and after that due to the auto post back to select the row.

That inhibits - for sure - proper execution of my code, I want to display a confirmation panel, delete the record, refresh the grid.

I tried the OnRowSelecting event in Javascript to cancel the automatic row selection but that event doesn't fire before the auto post back.

What can I do to select the row with a click and have properly working Buttons in the grid?

I searched around a bit in the forum and this came up a few times but with no real solution, at least none I could find so far.

Thanks for your help!
Fabian

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 22 Jun 2009, 04:46 AM
Hi Fabian,

I tried to implement a similar scenario on my end and it is working well as expected. Which version of the Grid are you using?Mine is RadControls for asp.net AJAX (2009.1.311.20). But i have found a forum link which which discusses a similar issue like yours. Go through it and see if it helps.
Way to have a delete button not count as a rowclick

Shinu
Tags
Grid
Asked by
Fabian Schulz
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or