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

On cancel new record deleted

2 Answers 42 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Konstantin
Top achievements
Rank 1
Konstantin asked on 16 Aug 2018, 10:39 AM

I am use in popup window TreeList, and bind treeList to array. Simple example http://dojo.telerik.com/OjipACUQ

Update button in popup window save record and array as one record.

Some problems i fix.

Add new record then edit and press cancel, record will be removed, but record is not dirty and not isNew()

How can i fix it?

In my application editing and adding works, in the example does not work. i don't know why.

2 Answers, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 20 Aug 2018, 10:30 AM
Hi Konstantin,

Thanks for the provided sample.

I have investigated sample and noticed few things. Firstly, the TreeList is bound to the first item of the dataSource - not to the dataSource itself.

e.g.

kendo.bind($("#example"), myDs.data()[0]);

You should create a model which has a property that references the dataSource and bind the view to that model.

Furthermore, the sync method syncs the current state of the data within the dataSource to the data provider. It is necessary to specify the transport configuration.

Below you will find a modified version of the provided sample:



Regards,
Georgi
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Konstantin
Top achievements
Rank 1
answered on 27 Aug 2018, 09:31 AM

Thanks.

I understood.

And my decision: 

1 http://dojo.telerik.com/OjipACUQ/4 but dropDownList broken in modal window

2 http://dojo.telerik.com/OjipACUQ/5 work fine

 

Tags
TreeList
Asked by
Konstantin
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Konstantin
Top achievements
Rank 1
Share this question
or