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

Checkbox combo - checked items sorting

3 Answers 364 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Yano
Top achievements
Rank 1
Yano asked on 13 Dec 2016, 08:44 AM

Hello, Im using Radcombo with checkboxes. When selecting, items are shown in order i checked them. After postback they are sorted in ascending order.

I checked C, B, A and A, B, C is shown. I need to preserve order i checked.

I didn't find a property to prevent this like (SortCheckedItems='false'). Is there any way how to achieve this?

Thanks

3 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 16 Dec 2016, 09:01 AM
Hello Yano,

By default sorting in the ComboBox is disabled. The items are displayed in the order they are loaded from the data source and checking/unchecking an item does not change the order. The items can be sorted if the control Sort property is set and the Sort() method is called as explained in this documentation article. As for a SortCheckedItems property such is not implemented.
Could you elaborate more on the following:
  • "When selecting, items are shown in order i checked them. After postback they are sorted in ascending order." Could you describe step-by-step your actions and the result from opening the ComboBox dropdown to the subsequent postback and re-opening the dropdown?
  • What method of binding do you use?
  • Are you calling the Sort() method or using other sorting logic?
It would be helpful if you could post a sample runnable page, as this will give us a more complete picture of your scenario.

Regards,
Ivan Danchev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Yano
Top achievements
Rank 1
answered on 16 Dec 2016, 10:31 AM

Hello, i dont meant sorting of items in datasource (dropdown list), but selected (checked) items shown in textbox.

This is a default behavior in your demos page RadCombo

Please take a look in attached files.

 

 

 

 

0
Ivan Danchev
Telerik team
answered on 21 Dec 2016, 09:23 AM
Hello Yano,

Thank you for clarifying the scenario.

Indeed after a postback the checked items appear sorted in the ComboBox input area. This behavior is by design and is not configurable. You can log your idea as a feature request in our Feedback Portal. Highly anticipated features often get implemented and included in future releases.

Regards,
Ivan Danchev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
ComboBox
Asked by
Yano
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Yano
Top achievements
Rank 1
Share this question
or