After Delete Row, First Row is Selected

4 posts, 0 answers
  1. WILLIAM
    WILLIAM avatar
    134 posts
    Member since:
    Jun 2012

    Posted 11 Jun 2013 Link to this post

    When a row is deleted from a grid, the focus shifts to the first row in the grid instead of staying where it is.  I tried testing this in the online demos, but there is no way to delete a row there; so I don't know if this is standard behavior or not.

    I think what my users are saying is if I have a grid with 5 rows, and row 3 is selected and then deleted, the focused row should still be row 3.

    ???
  2. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1216 posts

    Posted 14 Jun 2013 Link to this post

    Hi,

     This is the standard behavior in this case. You can either set the IsSynchronizedWithCurrentItem property to true, which will sync the selection with the current item after an item has been deleted (CurrentIndex will be still 3), or add your custom logic that manages selection and currency. If I were you, I would definitely use the former approach .

    Regards,
    Ivan Ivanov
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. WILLIAM
    WILLIAM avatar
    134 posts
    Member since:
    Jun 2012

    Posted 14 Jun 2013 Link to this post

    The IsSynchronizedWithCurrentItem is already set to True.
  4. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1216 posts

    Posted 19 Jun 2013 Link to this post

    Hi,

    What do you mean by mentioning focus. The framework's current focused element, selection, current item? I am attaching a sample project that demonstrates the difference between between IsSynchronizedWithCurrentItem true/false. Selection and currency are maintained. As for the focus, RadGridView stays focused.

    Regards,
    Ivan Ivanov
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top