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

[Solved] Kendo Grid with observable data

1 Answer 1079 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Russell
Top achievements
Rank 1
Russell asked on 08 Oct 2014, 08:46 AM
We are having difficulties data-binding the Kendo Grid with an observable array using a custom editor (dropdown) to select a data value.

It seems that the custom editor passes back the new object to the grid as expected but the new object is set to a property in the bound array.

In the example below when I add a new Promotion a new promotion is created in the bound array but the actual Promotion object is set to the Id property i.e.

Promotion.Id.Id & Promotion.Id.DisplayName.

I've created a jsfiddle example to illustrate the issue.

http://jsfiddle.net/rm18xexr/

Also if an edit button is added to the grid and a subsequent update is cancelled the Promotion is deleted from the bound data source.  We have spotted various posts stating that an id: property must be defined so have ensured this is set correctly.

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 09 Oct 2014, 11:44 AM
Hello Russell,

The problem is that you do not have implemented the transport read/update/create options. Please note that setting observable object to the dataSource data property will not give you full CRUD functionality.If you want to use local data then please check the following example that shows how to implement CRUD functionality with local data:

http://dojo.telerik.com/eWih/2

you can adapt it for your specific scenario, but it should show you the functionality that you are looking for.

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Russell
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or