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

Ranking selections within multiselect

3 Answers 275 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
Dale
Top achievements
Rank 1
Dale asked on 12 Nov 2014, 05:22 PM
I would like to use a multiselect control to not only pick multiple selections, but rank them in the DB so they appear in that order elsewhere.  Once the selections and rankings are saved, other areas in the application will display them in that order, or possibly pick the first/default option.

I'm assuming the order of selected items reflects the order items appear within the multiselect control?  So I could just pull them out in order and assign a rank?  But if I want to re-order selections, I would have to clear all of them, and re-add in the desired order.  Is there any way I could enable drag-drop or some other form of simple re-ordering?

Or maybe there's a better control or method for doing what I'm trying to do.  My options, as I see it:

1. Use multi-select (I like the UI), and just instruct users to pick them in the desired order of precedence.
2. Use multi-select to initially select, and another control to pick the default or rank them.
3. Enable/add some more advanced re-ordering UI to multi-select.
4. Use a different control to both select and rank.

Please let me know if I've made any faulty assumptions, or a better option is available.

3 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 14 Nov 2014, 10:07 AM
Hello Dale,

I have answered the support thread opened on the same subject by your colleague Muthuraman. I would like to ask you to continue our discussion in only one thread to avoid duplication. Thank you for your understanding.

Here is a copy of the posted answer:

The MultiSelect widget uses HTML Select element under the hood to persists and post the selected items. That being said, the order of the tags shows the order of the selection, but does not re-order Select options, hence the order of the selected values will match the order of the items in the popup element. Check the following screencast (link to the test demo) for better understanding of the above explanation.

The drag&drop of the selected tags can be enabled, but this will not reflect the order of the posted values, because of the above explanation. Also re-adding items in a specific order will not affect the order of the Select options.

I believe the most feasible option of the listed above is "2". You can use the MultiSelect widget to allow multiple selection, but you will need to persist the order in different place/input. Currently we do not have a specific widget that will do exactly the wanted functionality. Nevertheless, I believe that you can use the option 2 and just persist the order of the tags. Would this be sufficient?

Looking forward to hearing from you.


Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Dale
Top achievements
Rank 1
answered on 14 Nov 2014, 03:16 PM
Thank you for the screencast.  That's very helpful.  I wasn't aware that Muthu opened a ticket.  We'll try to coordinate our communications better.

#2 isn't a bad option.  If we go that route, I'll probably drop the ranking idea and just pick a default from a drop-down that reflects the selections in the multi-select.

If I wanted to pick and rank at the same time, a grid would probably be the best option, right?  Add new rows, pick option from a drop down, and enter a rank in another column.
0
Georgi Krustev
Telerik team
answered on 18 Nov 2014, 10:07 AM
Hello Dale,

Indeed, the Grid will be a better solution if you need to update multiple fields of a model. Give it a try and let us know if other questions arise.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
MultiSelect
Asked by
Dale
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Dale
Top achievements
Rank 1
Share this question
or