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

Nested properties

1 Answer 81 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Keith
Top achievements
Rank 1
Keith asked on 09 Aug 2016, 07:03 PM

Hi

I'm trying to implement nested property binding. I've found the following article in your documentation but that example doesn't seem to be working at the moment so I've created a Dojo highlighting the issue.

First time you run, everything displays correctly. If you then click the Rebind Local button, all of the nested properties fail to show. It seems to be that whenever you set the data directly, the fields (or at least the "from"s) as set in the model are ignored. Is this expected behaviour and if so, is there a workaround?

Thanks

Keith

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 11 Aug 2016, 10:52 AM
Hello Keith,

The behaviour is expected and occurs because the dataSource does not parse the data that is passed through the .data() method. That said, the schema.model settings (the 'from' property) is not taken into account.

In order to workaround this you may use the setDataSource method which does not replace the current dataSource's data but replaces the current dataSource instance. Here is a quick example:


Regards,
Alexander Valchev
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Grid
Asked by
Keith
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or