-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
20 lines (20 loc) · 751 Bytes
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$(function(){
var oDataContext = new DevExpress.data.ODataContext({
url: "https://services.odata.org/Northwind/Northwind.svc",
errorHandler: function (error) {
alert(error.message);
},
entities: {
Products: { key: "ProductID" }
}
});
$("#dataGrid").dxDataGrid({
columns:["ProductID","ProductName","Category.CategoryID","Category.CategoryName"],
dataSource: new DevExpress.data.DataSource({
store: oDataContext.Products,
select: ['ProductID', 'ProductName', 'Category.CategoryID', 'Category.CategoryName'],
expand: ['Category'],
filter: ['Category.CategoryID', '=', 5]
})
});
});