var cliente = $("#cboCliente").kendoDropDownList({
autoBind: true,
filter: "contains",
dataTextField: "Nome",
dataValueField: "Id",
dataSource: {
serverFiltering: true,
transport: {
read: { url: urlBase + "/principal.php?ACAO=ComboClientes", dataType: "json", type: "POST", data: { MODULO: "Seguranca", TELA:"ClonarUsuario"} },
},requestStart: function (e) {
$(".clCarregando").show();
},
requestEnd: function (e) {
$(".clCarregando").hide();
}
},
valueTemplate: '<img class="selected-value" src="Imagens/#:Ativo#.png" style="width: 25px; vertical-align: middle;"/><span> #:Nome#</span>',
template: kendo.template('<img class="selected-value" src="Imagens/#:Ativo#.png" style="width: 25px; vertical-align: middle;"/><span> #:Nome#</span>'), });
The "Active" and what I call in the valueTemplate and template comes from my database, so it can be filled with 0 or 1, since the field is bit. I created two images for active and inactive and gave them the name 0 and 1. So when called it will load the corresponding image.