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

[Solved] Unusual SelectedRow behaviour after edit

1 Answer 80 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Andrew
Top achievements
Rank 1
Andrew asked on 28 Apr 2009, 01:25 AM
Hi,

I have implemented the ability to move rows up and down a GridView. The GridView itself is editable

This works all the time except for one case

If I have 4 rows for example, and on the bottom row, I edit some of the details. 

Then I decide I want to move the 1st row down to the 2nd row, so I press my button which swaps it, and sets the SelectedItem to the 2nd row

SomeDataGrid.SelectedItem = SomeObservableCollection[index + 1]; 

It initially selects the appropriate row but as soon as "RowLoaded" events are finished the application automatically jumps to the row I previously edited. This scenario occurs on all the rows until I select the row I changed and move it to another row. After that, the up / down functionality works without a problem.

Suggestions?

1 Answer, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 30 Apr 2009, 04:40 PM
Hi Andrew,

We will need some help in reproducing the issue in order to assist you and /or find  a workaround.  I was trying to resemble this behavior here but so far with no success. Perhaps you can send us a sample project or at least paste  a piece of code ( the part handling editing, swapping records  and selection).

Kind regards,
Pavel Pavlov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Andrew
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Share this question
or