Hi,
I'm trying to populate my grid using a .json schema but i'm facing a weird problem. I first collect the data and initialize the datasource, with both structures being exactly the same. When the grid is drawed it doesn't follow the order of both structures and it "randomly" loads the rows.
This start happening with 5 or more rows.
I think it's a problem related to how Kendo draws the grid in the DOM.
I'm using Kendo with Angular2:
@ViewChild("kendoGrid")
private kendoGridElement: ElementRef;
this.kendoGrid = jQuery(this.kendoGridElement.nativeElement).kendoGrid(this.kendoGridOptions).data("kendoGrid");
kendo.bind(this.kendoGridElement.nativeElement, data);
this.kendoGridOptions = {
dataSource: {
data: data,
pageSize: pageSize,
group: {
field: "test",
dir: "desc"
},
schema: {
model: {
id: "code"
}
}
},
sortable: true,
groupable: false,
scrollable: {
virtual: false
},
columns: [
{
field: "shortText",
title: "Name",
headerTemplate: template1
},
{
field: "valueAsString",
title: "Value",
headerTemplate: template2,
},
{
field: "category",
title: "Type",
headerTemplate: template3,
},
{
field: "tags",
title: "Tags",
headerTemplate: template4,
template: template5
},
{
field: "longText",
title: "Description",
headerTemplate: template6
},
{
title: "Command",
template: template7,
},
{
field: "isPinned",
title: " ",
width: "40px",
template: template8
],
};