Structure - mvvm / datasources / binding

2 posts, 0 answers
  1. cra
    cra avatar
    16 posts
    Member since:
    Jun 2012

    Posted 15 Dec 2015 Link to this post

    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.

  2. Alexander Valchev
    Alexander Valchev avatar
    2873 posts

    Posted 17 Dec 2015 Link to this post


    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.

    Alexander Valchev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top