Datalinking against properties in two ViewModels?
I can not seem to get it right with datalinking and create a different type of datalinking. Any idea to get it to work?
- # Csharp
- [Serializable]
- public class BokingViewModel
- {
- public AccountViewModel AccountViewModel { get; set; }
- public TravelViewModel TravelViewModel { get; set; }
- public int Ordernr{ get; set; }
- }
- # Javascript
- var customer = {
- // Kunduppgifter
- $("#form1").each(function (i) {
- $("fieldset.contact input", this)
- .link(customer, {
- "AccountViewModel.Firstname", "Firstname"
- });
- });
- $(customer).data("Firstname", "Test");