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

issues when toggle the tag modes with rebind attribute

2 Answers 40 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
Freddy
Top achievements
Rank 1
Freddy asked on 02 Feb 2016, 02:13 AM

Hello,

 I met a situation that I should toggle the multiselect control's tag mode dynamically. when there are more than fixed amount items, use single mode, when less than the amount, then use multiple mode. 

According to this, I should use k-rebind to recreate the control while the tagMode changed. But the first time it always clear the selected items. I google it and somebody suggest to use k-ng-model, and k-value-primitive, but it also cannot work. here is the sample in dojo.

Does anyone know how to fix this?

2 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 04 Feb 2016, 09:11 AM
Hello Freddy,

In general, the widget is not designed to change the tagMode option dynamically. Hence the only feasible way to accomplish your goal is to use several of the widget's API methods to change the tag mode and then re-select the selected values. Check the updated demo:
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
Freddy
Top achievements
Rank 1
answered on 04 Feb 2016, 09:22 AM
Thanks Georgi, it is great, it indeed make sense.
Tags
MultiSelect
Asked by
Freddy
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Freddy
Top achievements
Rank 1
Share this question
or