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

Remove Multiples

1 Answer 35 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
Kailash
Top achievements
Rank 1
Kailash asked on 06 Dec 2014, 01:28 PM
I am using Kendo UI Multiselect and have this Data:

var data =
[
{ text: "Shirt-Black", value: "1" },
{ text: "Shirt-Brown", value: "2" },
{ text: "Shirt-Blue", value: "3" },
{ text: "Cap-Green", value: "4" },
{ text: "Cap-Red", value: "5" },
{ text: "Cap-White", value: "6" },
{ text: "Jacket-Denim", value: "7" }
];

Now I want that if I select "Shirt-Brown" then rest entries for shirt i.e. "Shirt-Black" and "Shirt-Blue" should not appear in the list which means that the user should not be able to choose the Shirt of two colors.Similarly, If a "Cap" of any color has been chosen then user should not be able to choose the "Cap" of any other color.

Is there any way to achieve this?

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 10 Dec 2014, 08:18 AM
Hi Kailash,

This behavior is currently not supported out of the box. You can achieve similar results by subscribing to the MultiSelect's select event, checking the dataItems and if necessary - updating the value, so there are no two items from the same group. 

Regards,
Alexander Popov
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
Kailash
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or