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

After Delete Row, First Row is Selected

3 Answers 73 Views
GridView
This is a migrated thread and some comments may be shown as answers.
WILLIAM
Top achievements
Rank 1
WILLIAM asked on 11 Jun 2013, 08:35 PM
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.

???

3 Answers, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 14 Jun 2013, 02:17 PM
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.

0
WILLIAM
Top achievements
Rank 1
answered on 14 Jun 2013, 06:55 PM
The IsSynchronizedWithCurrentItem is already set to True.
0
Ivan Ivanov
Telerik team
answered on 19 Jun 2013, 03:29 PM
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.

Tags
GridView
Asked by
WILLIAM
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
WILLIAM
Top achievements
Rank 1
Share this question
or