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

Clear Selected Items

5 Answers 511 Views
ListControl
This is a migrated thread and some comments may be shown as answers.
erwin
Top achievements
Rank 1
Veteran
Iron
erwin asked on 17 Sep 2010, 05:25 PM
What's the equivalent of

RadListBox.SelectedItems.Clear()

with the new control?

5 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 23 Sep 2010, 07:42 AM
Hello erwin,

Thanks for the writing.

You should use: SelectRange(startIndex, endIndex) method. This method clears the currently selected items and selects all items in the closed range [startIndex, endIndex].

Please refer to the code snippet below:

radListControl1.SelectRange(-1, -1);

Do not hesitate to contact us if you have other questions.

Regards,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
erwin
Top achievements
Rank 1
Veteran
Iron
answered on 23 Sep 2010, 02:37 PM
Thanks Peter,

IMHO not very intuitive / self documenting compared to

SelectedItems.Clear()

how about a ClearSelected() Method ?

Regards
Erwin
0
Peter
Telerik team
answered on 24 Sep 2010, 06:12 PM
Hi erwin,

Thank you for your suggestion.
We will consider adding such a property, because SelectRange seems a bit unnatural. Probably the property will be available in the next official release.

Don't hesitate to contact us if you have other questions.

Regards,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Yaroslav
Top achievements
Rank 1
answered on 14 Nov 2011, 04:48 PM
Same suggestion as Erwin, the SelectRange is not intuitive, I spend about an hour before finding this post.

ClearSelected() as before is more natural
0
Peter
Telerik team
answered on 17 Nov 2011, 03:33 PM
Hi Yaroslav,

Thank you for sharing your suggestion.

As I said before, we will add a new method - ClearSelected.
For the time being, as a workaround you should use SelectRange.

Let me know if I can be of further assistance.

All the best,
Peter
the Telerik team

Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

Tags
ListControl
Asked by
erwin
Top achievements
Rank 1
Veteran
Iron
Answers by
Peter
Telerik team
erwin
Top achievements
Rank 1
Veteran
Iron
Yaroslav
Top achievements
Rank 1
Share this question
or