jQuery UI Widgets Forums Grid jqxgrid and knockback

Tagged: 

This topic contains 1 reply, has 1 voice, and was last updated by  fjean 10 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • jqxgrid and knockback #62400

    fjean
    Participant

    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

    jqxgrid and knockback #62402

    fjean
    Participant

    Well re=phrasing my problem it seem that there is problem if the row data object isinitialized from a constructor.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.