jquery-bootgrid
jquery-bootgrid copied to clipboard
Nested object support
This feature enables native access to subproperties of a field (see example below).
...
<th data-column-id="person.id">Person ID</th>
<th data-column-id="person.age">Age</th>
...
Here person
is actually one field. But instead of being a value like number
or string
it's an object
that has properties which are holding the content we're interested in (e.g. age, id and so on). See the example object below.
{
...
rows: [
...
{
...
person: { id: "p-01", age: 55 }
}
]
}
Many thanks to Mohammed Riyad El Khoudary for conceptional work.
+1 :+1:
+1
I think this is a critically important enhancement. I've tried to handle it with converters, but I haven't had any luck thus far.
+1
Try data-formatter.
formatters: { "age": function(column, row) { return row.person.age; } }
My data does not show me, what is my mistake?
`{
"current":"1",
"rowCount":"10",
"rows":[
{
"_id":"57e3cd01cd4ff73adfe6a7b2",
"evento":"prueba1",
"fecha":"2016-09-05",
"tipo":"prueba1",
"textolibre":"This is a....",
"localizacion":{
"continente":"am",
"pais":"El Salvador",
"ciudad":"El salvador"
},
"__v":0
}
],
"total":1
}
<th data-column-id="localizacion.pais" data-type="string">Pais</th>`
Are there any plans about this feature?
http://gijgo.com/grid/demos/nested-jquery-grids