I’m trying to bind a jqxgrid to an observablearray containing knockback viewmodel object :
ns.BuildData = kb.ViewModel.extend({
constructor: function (model) {
var $this = this;
this.Changelist = ko.observable(model.attributes.Changelist);
}
});
As you see the constructor take a parameter which is the data model.
And then i pass a collection of those BuildData viewmodel and then the databind from jqx fails because it seem to create a copy of the object and then as it does not have knowledge of parameters the constructor fails because it tries to access a property on an undefined model.
Someone had similar problem with this ?
Is there a way to prevent the creation of a copy ? (that the conclusion i got while debugging).
thank you