Oh Hi!
I’ve been using ExtJs lately to get data from a json and display it in a nice way. Extjs does a very good job.
But today I’ve encountered a problem to display some values.
My json comes from a collection of objects. Each object has got an object in it, as follow :
{"product":
[{"saleReference":
[{"attributes":{"idReference":"100"}},
{"attributes":{"idReference":"101"}}]
}]
}
There are multiple product, but right here it doesn’t matter.
So, in my cell, the display result is : [object Object],[object Object],… and so on as I’ve got a dataIndex using saleReference directly, like :
dataIndex : 'saleReference'
I’ve tried to use ‘saleReference.attributes.iReference’ to get it, but it didn’t work. I get a “obj.saleReference.attributes is undefined” error.
I’ve also tried to use “combobox” to display the collection of object, but didn’t get any result.
If someone has already gotten this problem and solved it, I’m really interested in the solution.
Use renderer to format value. Eg:
See API for additional information.