Adding a new record in a child datasource results in duplicate parent source when bound to view

2 posts, 0 answers
  1. Ian
    Ian avatar
    12 posts
    Member since:
    Sep 2017

    Posted 09 Nov 2017 Link to this post

    Dojo demonstrating the issue: https://dojo.telerik.com/@ian+telerik@ocucom.com/EBeDE

    When using a HierarchicalDataSource bound to a viewModel, using any method to insert a new row in a child datasource results in a duplicate top-level item in the bound HTML view, until the "change" event is manually triggered on the parent. 

    My goal is putting together a hierarchical product editor (for, say, departments and employees; some hierarchy where the children are of differing object types to the parent). 

     

  2. Ianko
    Admin
    Ianko avatar
    1815 posts

    Posted 13 Nov 2017 Link to this post

    Hello Ian,

    The described behavior is designed so. The idea behind that is that when there batch editing, multiple items to be edited, but only once change event is triggered, the HierarchicalDataSource to traverse through all items and process the data. 

    In order to accomplish an automatic processing on each command you can enable the autoSync optionhttps://dojo.telerik.com/EFuHum

    Regards,
    Ianko
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top