@Html.EJS().ComboBox("demandaid").DataSource((IEnumerable<object>)ViewBag.data).PopupHeight("500px")
.Placeholder("Equipemento/item").FloatLabelType(Syncfusion.EJ2.Inputs.FloatLabelType.Always).PopupHeight("270px").Fields(new ComboBoxFieldSettings { Text = "descricao", Value="demandaid" }).ItemTemplate("<span><span class='colunacombobox'>${numdemanda}</span><span class='colunacombobox2'>${descricao}<span class='colunacombobox2'>${marca}</span><span class='colunacombobox2'>${modelo}</span><span class='colunacombobox2'>${numserie}</span>${if(tag)}<span class='colunacombobox2'>${tag}</span>${/if}</span>").Render() |
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
<div class="container" style="margin:20px;">
<input type="text" id="combobox">
</div>
<script>
var datasource = [{ demandaid: "1", descricao: "Cardioversor", numdemanda: "00003-3", marca: "Philips", modelo: "Cardio", numserie: "5489", tag: "668" },
{ demandaid : "2", descricao : "Incubadora", numdemanda : "00005-3", marca : "Siemens", modelo : "AA220", numserie : "162A" }];
var comboboxObj = new ej.dropdowns.ComboBox({
placeholder: 'Equipemento/item',
dataSource: datasource,
itemTemplate: "<span><span class='colunacombobox'>${numdemanda}</span><span class='colunacombobox2'>${descricao}<span class='colunacombobox2'>${marca}</span><span class='colunacombobox2'>${modelo}</span><span class='colunacombobox2'>${numserie}</span>${if(tag)}<span class='colunacombobox2'>${tag}</span>${/if}</span>",
fields: { text: 'descricao', value: 'demandaid' },
});
comboboxObj.appendTo('#combobox');
</script>
<style>
.colunacombobox,
.colunacombobox2 {
padding: 6px;
}
</style>
</asp:Content> |