74 строки
2.1 KiB
HTML
74 строки
2.1 KiB
HTML
<!DOCTYPE html>
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>Essential JS 1 : Autocomplete Default</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" charset="utf-8" />
|
|
<link href="../content/bootstrap.min.css" rel="stylesheet">
|
|
<link href="../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
|
|
<link href="../content/default.css" rel="stylesheet" />
|
|
<link href="../content/default-responsive.css" rel="stylesheet" />
|
|
<!--[if lt IE 9]>
|
|
<script src="../scripts/jquery-1.11.3.min.js" type="text/javascript"></script>
|
|
<![endif]-->
|
|
<!--[if gte IE 9]><!-->
|
|
<script src="../scripts/jquery-3.4.1.min.js" type="text/javascript"></script>
|
|
<!--<![endif]-->
|
|
|
|
<script src="../scripts/ej.web.all.min.js" type="text/javascript"></script>
|
|
<script src="../scripts/properties.js" type="text/javascript"></script>
|
|
<script src="../scripts/jsondata.min.js" type="text/javascript"></script>
|
|
</head>
|
|
<body>
|
|
<div class="content-container-fluid">
|
|
<div class="row">
|
|
<div class="cols-sample-area">
|
|
<div class="frame">
|
|
<div class="control">
|
|
<input type="text" id="selectCar" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript" class="jsScript">
|
|
$(function () {
|
|
$('#selectCar').ejAutocomplete({
|
|
dataSource: window.gridData,
|
|
fields: { key: "OrderID", text: "ShipCity" },
|
|
highlightSearch: true,
|
|
watermarkText: "Select a order",
|
|
width:"100%",
|
|
showPopupButton: true,
|
|
multiColumnSettings:{
|
|
stringFormat: "{0} ({3}) ({1})",
|
|
enable:true,
|
|
showHeader: true,
|
|
columns: [{
|
|
field: "CustomerID",
|
|
headerText: "CustomerID",
|
|
},
|
|
{
|
|
field: "OrderID",
|
|
headerText: "OrderID"
|
|
},
|
|
{
|
|
field: "EmployeeID",
|
|
headerText: "EmployeeID"
|
|
},
|
|
{
|
|
field: "ShipCity",
|
|
headerText: "ShipCity"
|
|
}
|
|
]}
|
|
});
|
|
});
|
|
|
|
</script>
|
|
<style>
|
|
.frame {
|
|
width:60%;
|
|
}
|
|
</style>
|
|
</body>
|
|
</html>
|