jQuery UI Widgets › Forums › Grid › Issue with nested grid using observable arrays.
Tagged: angular grid, data adapter, grid, jquery grid, jqxgrid, nested, nested grids, observable, observable array, observableArray, update
This topic contains 2 replies, has 2 voices, and was last updated by Mr.Moo 7 years, 7 months ago.
October 27, 2015 at 5:00 pm Issue with nested grid using observable arrays. #77411
I am posting here as I don’t want to use my Support Incidents for what may be my error.
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.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)!
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.NestedRows.push(new RowItem(data)) ;
But doing :
master.NestedRows.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.
MooOctober 28, 2015 at 9:36 am Issue with nested grid using observable arrays. #77440
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).
http://www.jqwidgets.com/October 28, 2015 at 11:41 am Issue with nested grid using observable arrays. #77445
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.
You must be logged in to reply to this topic.