TreeView transport.create

2 posts, 0 answers
  1. Rodrigo
    Rodrigo avatar
    2 posts
    Member since:
    Mar 2013

    Posted 29 Mar 2013 Link to this post

    It's posible to bind a HierarchicalDataSource to TreeView, and make Kendo automatically call the transport.create method when a node is appended?

    I have made a example code trying to do this, but with no success:

    Thanks in advance :)
  2. Alexander Valchev
    Alexander Valchev avatar
    2894 posts

    Posted 02 Apr 2013 Link to this post

    Hello Rodrigo,

    I am afraid that what you would like to achieve is not supported. Generally speaking, the DataSource have an autoSync option which if set to true will invoke the sync() method after each change made. Auto-syncing however is not yet supported in the HierarchicalDataSource. For more information please check this forum thread.

    Another issue with the provided example is that new records has an ID, which is why they are not considered as new, but as modified. Respectively the DataSource will attempt to submit them through the update transport.

    In order to insert new records, you should at first define the model ID field in the DataSource.schema.model configuration. Then the newly added items (nodes) should not have assigned ID. This thread discusses the same issue.

    Kind regards,
    Alexander Valchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top