var grid = new ej.grids.Grid({
dataSource: window.orderData,
allowPaging: true,
allowResizing: true,
pageSettings: { pageCount: 5 },
columns: [
{ field: 'OrderID', headerText: 'Order ID', textAlign: 'Right', width: 120, minWidth: 10 },
{
headerText: 'Order Details', customAttributes: { class: 'e-attr' }, columns: [
{ field: 'OrderDate', headerText: 'Order Date', textAlign: 'Right', width: 135, format: 'yMd', minWidth: 10, customAttributes: { class: 'e-attr' } },
{ field: 'Freight', headerText: 'Freight($)', textAlign: 'Right', width: 120, format: 'C2', minWidth: 10, customAttributes: { class: 'e-attr' } },
]
},
. . .
]
});
grid.appendTo('#Grid'); |