Nested properties

2 posts, 0 answers
  1. Keith
    Keith avatar
    88 posts
    Member since:
    May 2007

    Posted 09 Aug Link to this post

    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

  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 11 Aug Link to this post

    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.
     
  3. Kendo UI is VS 2017 Ready
Back to Top