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

GridView scrolling when line is inserted

2 Answers 53 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Alexandre
Top achievements
Rank 1
Alexandre asked on 18 Mar 2011, 11:41 PM
Hello,
I'm working with a GridView in bound mode. It's bounded with a List which receives new rows during execution time. At a certain point, a new row is added, this row turns to be the selected one and the gridview scrolls. That's my problem: I want it to maintain the line (chosen previously by the user) as the one selected. But, this is not the beahaviour I'm getting, because every row which is added or updated becomes the one selected.
How can I make the selected row stay the same while adding this new rows to the bounded list?

Thanks,
Alexandre

2 Answers, 1 is accepted

Sort by
0
Accepted
Emanuel Varga
Top achievements
Rank 1
answered on 19 Mar 2011, 09:28 AM
Hello Alexander,

Just use the following:
radGridView1.MasterTemplate.SelectLastAddedRow = false;

Hope this helps, if you have any other questions or comments, please let me know,

Best Regards,
Emanuel Varga

Telerik WinForms MVP
0
Alexandre
Top achievements
Rank 1
answered on 21 Mar 2011, 04:18 PM
Thank you, Emanuel. It worked fine.
Tags
GridView
Asked by
Alexandre
Top achievements
Rank 1
Answers by
Emanuel Varga
Top achievements
Rank 1
Alexandre
Top achievements
Rank 1
Share this question
or