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

TreeView transport.create

1 Answer 89 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Rodrigo
Top achievements
Rank 1
Rodrigo asked on 29 Mar 2013, 04:13 PM
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: http://jsbin.com/alibem/10/edit

Thanks in advance :)

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 02 Apr 2013, 10:59 AM
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!
Tags
Data Source
Asked by
Rodrigo
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or