EnablePostBackOnRowClick doesn't fire OnRowSelecting

2 posts, 0 answers
  1. Fabian Schulz
    Fabian Schulz avatar
    16 posts
    Member since:
    Jul 2007

    Posted 20 Jun 2009 Link to this post

    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!
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 21 Jun 2009 Link to this post

    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

  3. DevCraft R3 2016 release webinar banner
Back to Top