or
var
dataSource =
new
kendo.data.DataSource({
data: gblProductsData,
schema:
{
model:
{
fields:
{
id: { type:
'string'
},
referencecode: { type:
'string'
},
description: { type:
'string'
},
category: { type:
'string'
},
unitofmeasureid: { type:
'string'
},
buffergroupid: { type:
'string'
},
defaultorderworkflowtypeid: { type:
'string'
},
isarchivedproduct: { type:
'boolean'
}
}
}
},
pageSize: 10
});
//Reset grid
$(
'#divProductGrid'
).html(
''
);
//Setup grid
gblDivProductGrid = $(
'#divProductGrid'
).kendoGrid({
dataSource: dataSource,
autoBind:
true
,
height:
'auto'
,
scrollable:
true
,
filterable:
true
,
sortable:
true
,
groupable:
false
,
pageable:
true
,
toolbar: productGridToolbarTemplate,
detailTemplate: productGridDetailTemplate,
detailInit: InitialiseProductDetails,
detailExpand: ProductDetailExpand,
detailCollapse: ProductDetailCollapse,
columns:
[
{
field:
'referencecode'
,
title:
'Reference Code'
},
{
field:
'description'
,
title:
'Description'
},
{
field:
'category'
,
title:
'Category'
,
filterable:
false
},
{
field:
'unitofmeasureid'
,
title:
'Unit Of Measure'
,
filterable:
false
},
{
field:
'buffergroupid'
,
title:
'Buffer Group'
,
filterable:
false
}
]
});