Discrading previously selected rows on grid.select()

2 posts, 0 answers
  1. deepa
    deepa avatar
    1 posts
    Member since:
    May 2016

    Posted 12 May 2016 Link to this post

    If a do a grid.select(row1), and then do a grid.select(row2), I mean to switch the selection from row1 to row2. But this doesn't happen; both rows are selected. To achieve the switching, I need to do a grid.clearSelection() before selecting again, but that fires the change event 2 times.

    How can i select one row at a time programatically? By manually clicking on rows, the selection switches, and change event is only fired once. So I'm thinking there has to be a way to reproduce that programatically as well.

  2. Marin
    Admin
    Marin avatar
    1057 posts

    Posted 13 May 2016 Link to this post

    Hi,

    You should have AllowMultiRowSelection="false" set for the grid, otherwise the control will be able to select more than one rows and you have clear the previous selection in advance. With AllowMultiRowSelection="false" only a single row will be selected at a time.

    Regards,
    Marin
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top