jQWidgets Forums

jQuery UI Widgets Forums Grid Issue with nested grid using observable arrays.

This topic contains 2 replies, has 2 voices, and was last updated by  Mr.Moo 9 years, 5 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author

  • Mr.Moo
    Participant

    I am posting here as I don’t want to use my Support Incidents for what may be my error.

    I have

    var master = new $.jqx.observableArray() ;

    that is bound to my grid. This array is then populated using:

    master.push(new MasterItem(data)) ;

    Using the browser’s debug console when I change a value in it the UI updates as I’d expect.

    master[0].Foo = ‘Bar’ ;

    Displays Bar in the appropriate column.

    But I also want my nested view’s data to come from an observableArray. So in my custom object (MasterItem) when I tried to create an new $.jqx.observableArray I get an error saying “too much recursion”. If I then try a ko.observableArray the data appears in the nested grid but the console tells me the array length is 0 (zero)!

    master[0].NestedRows.length ;
    Returns 0.

    But if I use new Array() I get a size of (in this instance) 4. But neither of the two methods mentioned here update the UI when changes are made to them via the debug console. When I populate the NestedRows array I use :

    master[0].NestedRows.push(new RowItem(data)) ;

    But doing :

    master[0].NestedRows[0].Bar = ‘Foo’ ;

    from the browser’s debug console to change a value has no effect.

    All of the properties used in the RowItem are ko.observables as well.

    I can’t help but point the finger at myself here, but I cannot see what I am doing wrong. I have told both of the $.jqx.dataAdapters that the datatype is an observableArray, but this makes no difference.

    Sorry I can’t show more of my code but corporate rules forbid it.


    Moo


    Dimitar
    Participant

    Hello Moo,

    Unfortunately, this information is insufficient for us to determine the source of the issue you experience. If you can, please create a simplified version of this scenario with mockup data and share it via jsEditor/JSFiddle so that we can investigate if there is anything wrong with your implementation. Make sure you are using the latest version of jQWidgets (3.9.0).

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/


    Mr.Moo
    Participant

    Thank you for the reply, but I did suspect it was short of what you would need. So I am going to compose an email to your support team and provide the sources in the email.

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

You must be logged in to reply to this topic.