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

[Solved] Master / Detail question (mobile) with DataSource

2 Answers 127 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
BeOne Stuttgart
Top achievements
Rank 1
BeOne Stuttgart asked on 30 Sep 2014, 07:37 AM
Hallo,

we have a typical master / detail scenario, where we want to display projects on one view and the corresponding categories on a detail view. Until the latest version we manged to do this by using two different datasources (one per view). The first datasource loads the data via transport.read from a JSON webservice. Each project allready contains all depending categories. Because of that we used the first datasource to populate the second one by getting the selected item via uid. This item contains a property with the corresponding categories. These categories are used as data for the second datasource. (transport.read) With the current version this method stopped working. We are getting a "object not found" error, when returning back from detail view and trying to set the currentSelectedItem within the viewmodel with another project. It seems, that the parent() method is now missing on the project dataitems within the first datasource. 

Any ideas on how to do it right? Is it a bug within the new version, or is our approch not the way to do this kind of task?

DataSource1
     >> Projects

DataSource2
     >> Categories (Project.Categories)

Thanks,
Martin

2 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 02 Oct 2014, 06:50 AM
Hi,

I am not sure of the specifics of your implementation, but in general, the view model instances should not communicate with each other. Apart from that, the uid logic is correct - the same approach is used in this example. Can you please demonstrate your implementation in a dojo? We should be able to assist you further from there. 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
BeOne Stuttgart
Top achievements
Rank 1
answered on 11 Oct 2014, 07:07 PM
Sorry for the late answer, but I was on vacation the last week. At the moment we found a workaround in storing the actual data within a extra variable. On every view change we use this variable as datasource for both kendo datasources! Now we won´t get the "object not found" method. 
Tags
Data Source
Asked by
BeOne Stuttgart
Top achievements
Rank 1
Answers by
Petyo
Telerik team
BeOne Stuttgart
Top achievements
Rank 1
Share this question
or