This is a migrated thread and some comments may be shown as answers.

Wrong loading order

1 Answer 126 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Riccardo
Top achievements
Rank 1
Riccardo asked on 19 May 2016, 07:42 AM

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
           ],
       };

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 19 May 2016, 02:38 PM
Hi Riccardo,

Please note that the Kendo UI suite will be reworked and a new one that will support Angular 2 is currently being developed. However, it is not completely ready yet.

Please examine the following post that provides an approximate time on when the new widgets should be available.



Regards,
Viktor Tachev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Riccardo
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or