Telerik MVC, Combobox changing the css of an item
surfmuggle in action
HTML
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.2.913/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.2.913/styles/kendo.default.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.2.913/styles/kendo.dataviz.min.css">
<script src="http://cdn.kendostatic.com/2012.2.913/js/kendo.all.min.js"></script>
<script src="http://demos.kendoui.com/content/shared/js/console.js"></script>
<script src="http://demos.kendoui.com/content/shared/js/examples.js"></script>
<link rel="stylesheet" href="http://demos.kendoui.com/content/shared/styles/examples.css">
<script>
var musicians= [{ id: 1, name: "Melody Gardot", displayBold: true }
, { id: 2, name: "Lynn Withers", displayBold: false }
, { id: 3, name: "Blue Ray", displayBold: true }
, { id: 4, name: "Club de Belugas", displayBold: true }
, { id: 5, name: "Mizzy Li", displayBold: false }
];
var fabrics = [
{ text: "Cotton", value: "1" },
{ text: "Polyester", value: "2" },
{ text: "Cotton/Polyester", value: "3" },
{ text: "Rib Knit", value: "4" },
{ text: "Five", value: "5" },
{ text: "Six", value: "6" },
{ text: "Seven", value: "7" }
];
</script>
<script id="template" type="text/x-kendo-tmpl">
# if (data.displayBold) { #
<span style="font-weight: bolder;">${ data.name }</span>
# } else { #
<span style="font-weight: normal;">${ data.name }</span>
# } #
</script>
<div class="demoBox">
<h1>Databinding with telerik Kendo Combobox</h2>
<div>Based on a question on <a href="http://stackoverflow.com/a/12550383/819887">stackoverflow</a> regarding <a href="http://demos.kendoui.com/web/combobox/template.html">Telerik MVC Tools</a> i created this fiddle.</div>
<h2>Create from Script</h2>
<h3>T-shirt...
CSS
h1, h2, h3 {font-weight: bolder; padding: 1em 0 0.1ex 0;}
h1 {font-size: 28px;}
h2 {font-size: 22px;}
h3 {font-size: 18px;}
.demoBox { margin: 2em;}