BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
<script>
function runComboBoxCostElementDefault() {
let comboBoxObject = new ej.dropdowns.ComboBox({
dataSource: @Html.Raw(JsonConvert.SerializeObject(ViewBag.source)),
fields: {
text: "Id",
value: "Id"
},
// set the template content for list items
itemTemplate: ' ${Id}-${FirstName} ${LastName}',
htmlAttributes: {
name: "UserId"
},
value: 1,
allowCustom: false,
popupHeight: "230px",
zIndex: 9999,
allowFiltering:true,
filtering: (e) => {
if (e.text!="") {
var predicate = new ej.data.Predicate('FirstName', 'contains', e.text, true);
predicate = predicate.or('LastName', 'contains', e.text);
var query = new ej.data.Query();
query = (e.text !== '' && e.value !== '') ? query.where(predicate) : query;
e.updateData(@Html.Raw(JsonConvert.SerializeObject(ViewBag.source)), query);
}
}
});
comboBoxObject.appendTo('#userComboBox');
}
</script> |