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

Bind column filed from an object value

1 Answer 349 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Naresh
Top achievements
Rank 2
Naresh asked on 09 Dec 2015, 01:34 PM

Hi Team,

 

Am Getting values as {Job:{Id:1,Name:'Developer',Domain:'IT'},EmployeeId:EMP001,Salary:{Value:50000}},

 

I have done binding as show below but Job and Salary values are empty.

 

How can i bind those values from its object, Am trying look something like Field{schema.Name or schema.Value}

 

Any help great appreciation :)

 

Thanks,

Naresh Veginati

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 11 Dec 2015, 08:08 AM
Hello Naresh,

To achieve the desired functionality you can try using the dot conversion to select sub property. For example:
columns: [
        { field: "Job.Id" },
        { field: "Job.Name" },
        { field: "Job.Domain" },
        { field: "EmployeeId" },
        { field: "Salary.Value" },
    ],

Also on the following link I created a small example which demonstrates the described approach:
http://dojo.telerik.com/aleCu

I hope this helps.

Regards,
Radoslav
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
Naresh
Top achievements
Rank 2
Answers by
Radoslav
Telerik team
Share this question
or