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

Prevent item selection from changing when a new item added

1 Answer 102 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Kris
Top achievements
Rank 1
Kris asked on 15 Aug 2012, 02:00 AM
When using a bindinglist on a ListView datasource, everytime a new object is added to the List, the view will automatically select the new item. 

What i would like is for the list to be updated but the selected item to stay where it is. How do prevent the default behaviour? 

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 17 Aug 2012, 12:25 PM
Hi Kris,

Thank you for writing.

RadListView uses RadListSource to store its items and the latter keeps track of the current item, thus the last added item is selected. You can easily deselect this item if you do not consider this functionality useful in your case:
radListView1.SelectedItem = null;
radListView1.CurrentItem = null;

There is a feature request for this functionality. Feel free to add your vote for it here: http://www.telerik.com/support/pits.aspx#/public/winforms/12335.

I hope this helps.
 
Regards,
Stefan
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Tags
ListView
Asked by
Kris
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or