Lets say i have a kendo dropdown like the following.
var data = [
{text: "Item1", value:"1", type: "User"},
{text: "Item2", value:"2", type: "User"},
{text: "Item3", value:"3", type: "Group"}
];
$("#dropdownlist").kendoDropDownList({
dataTextField: "text",
dataValueField: "value",
dataSource: data
});
Now, I would like to load glyphicon based on the type of the each item. In other words, glyphicon1 if item is of type "user" and glyphicon2 if item is of type "Group"
I know i can use the "template" to load icons with the items in the dropdown but how can i do it conditionally based on a property of the items?
var data = [
{text: "Item1", value:"1", type: "User"},
{text: "Item2", value:"2", type: "User"},
{text: "Item3", value:"3", type: "Group"}
];
$("#dropdownlist").kendoDropDownList({
dataTextField: "text",
dataValueField: "value",
dataSource: data
});
Now, I would like to load glyphicon based on the type of the each item. In other words, glyphicon1 if item is of type "user" and glyphicon2 if item is of type "Group"
I know i can use the "template" to load icons with the items in the dropdown but how can i do it conditionally based on a property of the items?