Tuesday, 13 August 2013

how to do data-bind for complex model knockout

how to do data-bind for complex model knockout

I am a newbee to knockout, I'm trying to move from the MVC ViewModel binding.
I have a complex model:
SearchStudentsModel which has 2 properties
Collection of Students (Subset of students)
Number of Students overall
Note that the length of the collection isn't equal to the number overall.
I need to implement a search functionality Student will have all the
regular properties plus IsActive indicator. I use ul and li tags to
data-bind the details.
The search screen should facilitate the user in marking the active flag
with an indicator (on and off) and immediately data should be saved in the
database.
All the examples I referred to talk about only one level of model. I have
a SearchStudent model and within that I have a collection of students.
How should the binding be for this hierarchy of models?

No comments:

Post a Comment