jquery-bootgrid icon indicating copy to clipboard operation
jquery-bootgrid copied to clipboard

Nested object support

Open rstaib opened this issue 10 years ago • 8 comments

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.

rstaib avatar Nov 12 '14 09:11 rstaib

+1 :+1:

ChrisRM avatar Jan 05 '15 12:01 ChrisRM

+1

kaitlynreese avatar Jan 25 '16 15:01 kaitlynreese

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.

treetopvt avatar Jan 27 '16 13:01 treetopvt

+1

dannyrose42 avatar Apr 16 '16 23:04 dannyrose42

Try data-formatter. formatters: { "age": function(column, row) { return row.person.age; } }

javarebel avatar Jun 07 '16 20:06 javarebel

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>`

rulogarcillan avatar Sep 22 '16 12:09 rulogarcillan

Are there any plans about this feature?

sergii-zhuravel avatar Apr 13 '17 07:04 sergii-zhuravel

http://gijgo.com/grid/demos/nested-jquery-grids

stvowi avatar Sep 23 '17 00:09 stvowi