|
[index.js]
var grid = new ej.grids.Grid({
dataSource: data,
allowPaging: true,
pageSettings: { pageCount: 3 },
toolbarTemplate: "#toolbar-template",
columns: [
{
field: "OrderID",
headerText: "Order ID",
isPrimaryKey: true,
width: 130
},
{ field: "CustomerID", headerText: "Customer ID", width: 170 },
{ field: "ShipCity", headerText: "Ship City" }
],
created: function(args) {
var dropdownlist = new ej.dropdowns.DropDownList({
dataSource: ["Berlin", "Madrid", "Marseille"],
placeholder: "City"
});
dropdownlist.appendTo("#ddlelement");
}
});
[index.html]
<div id='toolbar-template'>
<div id='dropdown' style="margin-top:5px">
<input type="text" tabindex="1" id='ddlelement' />
</div>
</div> |