<code>
input.ejDropDownList({
dataSource: contentItem.value.data,
width: "100%",
fields: { text: label, value: value }, }
});
var formattingValue = first.children[2].valueModel.name;
var inst = input.ejDropDownList("instance");
if (formattingValue == 2)
inst.option("cssClass", "formatting2");
if (formattingValue == 1)
inst.option("cssClass", "formatting1");
</code> |
<code>
<style>
.formatting1 .e-input{
font-weight:600;
}
.formatting2 .e-input{
font-weight:600 !important;
color:blue !important;
}
</style>
</code> |
<code>
input.ejDropDownList({
dataSource: contentItem.value.data,
width: "100%",
fields: { text: label, value: value },
cssClass: "formatting2",
change: function (args) {
this.option("cssClass",contentItem.value.data[args.itemId].formattingClass); }
});
</code> |
<code>
var first = contentItem.children[0];
var label = first.children[0].valueModel.name;
var value = first.children[1].valueModel.name;
if (input.hasClass('e-dropdownlist')){input.ejDropDownList('destroy');}
input.ejDropDownList({dataSource: contentItem.value.data,
fields: { text: value, value: value },
template: '<span style="${FormatCSS}" class="${FormatClass}"> ${FormatText} </div>',
change: function (args) { contentItem.value.selectedItem = contentItem.value.data[args.itemId];} });
</code> |