7 Answers, 1 is accepted
I have a project where I am re-writing one RadComboBox2, based on the value of another RadComboBox1. In addition, the list of values for the RadComboBox2 are from a web service, and so they are not sorted alphabetically. Also all of this must be accomplished without a post back.
So, though it is 6 months late, I thought I might post my solution here, so some future wayward dev, may find their way here and find this useful. If there is a better way than this, I couldn't find it, so I wrote my own.
This is a completely client side RadComboBox sort using the Telerik Client Side API.
Than you very much for your solution, I needed to implement custom sorting on client side and your solution was the best one; i did same thing removed all items and then added by order i wanted.
I found the client-side sorting method in one of the answers to not work as expected. So I changed it and came up with following method, that I found worked perfectly. The second parameter of sortOrder can be either 'asc' or 'desc'.
Thank you for sharing your sorting method with the community.
Our requirement below :
When user selects multiple checkbox it will appear in Combo Box itself. When we select options in Radcombobox and close the drop down and open it again, the selected items should be on top position in display order (Change position) and once it is deselected, it should set at same position as it was earlier. The requirement behind this is when there is long drop down, user does not have to scroll till bottom, they can see what he has selected once they open the drop down.
My code RadComboBox here :
Thank you for your help.
The sorting you describe will require custom implementation, since it defers from the sorting supported by the ComboBox by default: ascending and descending. You will have to implement your own logic in order to achieve the desired behavior. You can see the following documentation article, which shows and example of custom sorting implementation.
Telerik by Progress