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

Object with 'parent' field as datasource

3 Answers 51 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Roy
Top achievements
Rank 1
Roy asked on 11 Nov 2016, 09:57 AM

I've got an datasource that returns object with a parent field. When I try to show a column with a value from this field nothing is returned.

As it seems, the parent value is overwritten by kendo grid

$('#kendoGrid').kendoGrid({
        dataSource: [{parent: "value" }],
        height: 550,
        columns: [{                   
            field: "parent",
            title: "Parent Field"}]
    });

 

shows the following value in the grid:

function (){return o}

How can I fix this?

3 Answers, 1 is accepted

Sort by
0
Patrick | Senior Technical Support Engineer
Telerik team
answered on 11 Nov 2016, 09:58 PM
Hi Roy,

Coincidentally, this issue was  recently addressed in another forum post.   

Essentially, it isn't recommended to use "parent" as a field.  But a way to fix the issue can be seen in this Kendo UI Dojo by Progress. 

Hope this helps!

Regards,
Patrick
Telerik by Progress
 
Build rich, delightful, *native* Angular 2 apps with Kendo UI for Angular 2. Try it out today! Kendo UI for Angular 2 (currently in beta) is a jQuery-free toolset, written in TypeScript, designed from the ground up to offer true, native Angular 2 components.
 
0
Roy
Top achievements
Rank 1
answered on 14 Nov 2016, 07:47 AM

Ok, I didn't find that post while looking for a solution.

Is this behavior documented somewhere, and are there more fields that are reserved for kendo itself?

0
Patrick | Senior Technical Support Engineer
Telerik team
answered on 15 Nov 2016, 03:53 PM
Hi Roy,

I would take a look at this list from w3schools which shows a list of reserved words.  Just be sure to use best judgement so there's no strange behavior in your application.  

I hope this clears things.

Regards,
Patrick
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Roy
Top achievements
Rank 1
Answers by
Patrick | Senior Technical Support Engineer
Telerik team
Roy
Top achievements
Rank 1
Share this question
or