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

Structure - mvvm / datasources / binding

1 Answer 34 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
cra
Top achievements
Rank 1
cra asked on 15 Dec 2015, 07:05 PM

Hello all,

I have the following workflow:

 

A user will be searching for an employee (using an autocomplete). Once the desired employee is selected an output of the employee's information will be displayed (information like name, dates, etc). In addition the employee detail includes a grid with one or more locations.

 

Currently I have a single viewModel with a DataSource that the employee search autocomplete is bound to. Once the employee is selected I had planned to set an additional datasource to contain the detailed employee information and perhaps even a third one for the grid (location) data.

Is this structure appropriate or is there a more preferred method?

 

Thanks for any and all input.

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 17 Dec 2015, 12:03 PM
Hello,

I suggest to use a single ViewModel for data presentation. This does not mean that you have to read all dataSources at once, the data can be loaded and synched in parts.

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