1 person found this helpful
try letting the DG render it without the dg columns first.. see if your field titles are correct. it may also be that the objects are nested deeper than you think and the dg is confused.
Thanks ethr - seems you are right because without columns specified, I get a column for each [object Object] with the array index number as the heading - My question then is - How do I get the DG to drill down a level (or 2)? Becasue lifting a level in the PHP creates the problem of the object being over-written by each iteration over the rows (from Db query).
It sounds like its not being mapped into the arraycollection properly. You have an additional layer of array in there. Can you look at the arraycollection in a debugger? You may have to dig deeper into the resultset to get it mapped properly.
Thanks ethr - sorted
Debug mode did help me figure that:
dataArray = new ArrayCollection(rawArray);
behaves differently in terms of how deep the object is than
new ArrayCollection(event.result as Array) //(this one has fewer levels)
Which suggests to me that "new Array" creates an array wrapper while "as Array" casts the existing result as an Array - even though the IDE sugggests they are equivalent... anyway - fixed.... moving on to find the next problem... advancedDataGrid grouping ...