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

MultiSelect, Angular, ConditionalFormatting

3 Answers 140 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
Tim R
Top achievements
Rank 1
Tim R asked on 26 Sep 2014, 12:14 AM
Judging from this demo:

http://demos.telerik.com/kendo-ui/multiselect/angular

it seems I would not be able to bind to an array of objects of this type:

   { id: 100,  title: 'foo', expiryDate: [a date or null goes here]}


and apply some conditional formatting to the dropdown list (e.g. <del>strikethrough</del>)  based on finding a value in expiryDate.

Is that correct? There can be no conditional formatting with the multiselect based on a property other than display value or bound value?

3 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 29 Sep 2014, 12:14 PM
Hi Tim,

This behavior is possible and could be achieved by specifying a Kendo UI template or a function that should be used for the MultiSelect's tagTemplate and itemTemplate options. Here is an example illustrating how this could be achieved.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Tim R
Top achievements
Rank 1
answered on 29 Sep 2014, 12:19 PM
Thanks, Alexander. It seems the style that is applied by the tagTemplate appears only after the choice has been made and the dropdown list closes.  But is there a way to show the style while the items are being displayed in the dropdown list?

Toppings [                                                 ]
                    cheese
                    <del>spinach</del>
                    peppers
                    onions
                    artichoke
0
Alexander Popov
Telerik team
answered on 29 Sep 2014, 12:27 PM
Hi Tim,

This is the expected behavior of the tagTemplate option, that is why I recommended using an itemTemplate as well.

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