Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
151305 | Feb 6,2020 09:53 AM UTC | Feb 10,2020 09:58 AM UTC | jQuery | 3 |
![]() |
Tags: ejDropDownList |
$('#customerList').ejDropDownList({
dataSource: customerList ,
fields : { text: "ContactName", value: 'ContactName' },
itemsCount : 20 ,
popupHeight: "200px",
width: "250px",
enableFilterSearch: true,
enableServerFiltering: true,
allowVirtualScrolling: true,
search: function(args) {
if (args.searchString.length < 3 ) { //check search string length
args.cancel = true;
}
} |
<div class="control">
<div class="ctrllabel">Select a Customer Name</div>
<input type="text" id="customerList" />
</div>
<script type="text/javascript">
var customerList = ej.DataManager({
crossDomain: true
});
var query = ej.Query().select("ShipName", "ShipCountry").where("ShipCountry", "equal", "France", false);
$(function () {
$('#customerList').ejDropDownList({
dataSource: customerList ,
query: query,
fields: { text: "ShipName", value: "ShipCountry" },
itemsCount : 20 ,
popupHeight: "200px",
width: "250px",
enableFilterSearch: true,
enableServerFiltering: true,
allowVirtualScrolling: true,
search: function(args) {
if (args.searchString.length < 3 ) { //check search string length
args.cancel = true;
}
}
});
});
</script>
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.