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

Read-only tagged items in multiselect

7 Answers 525 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
Andriy
Top achievements
Rank 1
Andriy asked on 02 Dec 2014, 01:32 PM
Hi there,

I need to implement some specific behavior for multiselect widget ( see attached image).

1. Need to disable some items within selected ones in a multiselect field.
2. Hide 'close/delete/X' icon for disabled ones.
It would be great for example to apply some template for each item to handle this.

Maybe you can recommend any existing API for this.

Best regards,

Andriy Frankiv

7 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 03 Dec 2014, 12:25 PM
Hello Andriy,

Currently, widget does not support such functionality. You can, however, return the items that are "read-only" manually. Check this Dojo demo for one possible approach. You will need to hide the "X" button manually too - find the LI elements and hide the <span> element to all tags that should be "read-only".

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
Andriy
Top achievements
Rank 1
answered on 03 Dec 2014, 12:34 PM
Hello Georgi,

Currently we use MVVM approach. Could you please provide some solution/workaround that will follow MVVM rules?

Best regards,

Andriy Frankiv
0
Georgi Krustev
Telerik team
answered on 04 Dec 2014, 09:56 AM
Hello Andriy,

Sure, no problem. Check this Dojo demo that demonstrates how to detect some changes and update the model value if needed.

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
Andriy
Top achievements
Rank 1
answered on 04 Dec 2014, 10:10 AM
Hello Georgi,

Thanks for your reply.

Could you please update the last sample with logic for disabling some selected items and hiding 'X' icon for them?

Best regards,

Andriy Frankiv
0
Andriy
Top achievements
Rank 1
answered on 04 Dec 2014, 10:12 AM
Hello Georgi,

Thanks for your reply.

Could you please add logic to this example for disabling some selected items and hiding 'X' icon for them?

Best regards,

Andriy Frankiv
0
Accepted
Georgi Krustev
Telerik team
answered on 08 Dec 2014, 08:56 AM
Hello Andriy,

Here is the updated demo. Notice how we use the dataBound and change events to accomplish the desired functionality.

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
Andriy
Top achievements
Rank 1
answered on 08 Dec 2014, 09:49 AM
Hello Georgi,

Thanks a lot for your reply. It was rather helpful.

Best regards,
Andriy Frankiv
Tags
MultiSelect
Asked by
Andriy
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Andriy
Top achievements
Rank 1
Share this question
or