Checkbox combo - checked items sorting

4 posts, 0 answers
  1. Yano
    Yano avatar
    9 posts
    Member since:
    Sep 2009

    Posted 13 Dec 2016 Link to this post

    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

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    2134 posts

    Posted 16 Dec 2016 Link to this post

    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.
  3. Yano
    Yano avatar
    9 posts
    Member since:
    Sep 2009

    Posted 16 Dec 2016 Link to this post

    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.

     

     

     

     

  4. Ivan Danchev
    Admin
    Ivan Danchev avatar
    2134 posts

    Posted 21 Dec 2016 Link to this post

    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.
Back to Top