Zdravko Kolev
1 min readJul 21, 2022

--

Have you checked the documentation above? :) There is a section explaining exactly this, how to bind complex data or visualize a composite data with a custom template.

You have two options:

- Use the `value` of the cell, that containes the nested data

- Use the `cell` object in the template from which to access the `row.data` and retrieve any value from it.

I have created a sample showcasing this:

https://stackblitz.com/edit/angular-jdacwl?file=src/app/grid/grid-nested-data-binding-2/grid-nested-data-bind2.html

And a code snippet:

<igx-column field="abbreviation.long" header="Long">

<ng-template igxCell let-cell="cell">

<div>

<div>

{{ cell.value }}

{{ cell.row.data['name'] }}

{{ cell.row.data['abbreviation']['short'] }}

</div>

</div>

</ng-template>

</igx-column>

Data:

export const AMINO_DATA = [

{

name: 'Alanine',

abbreviation: {

short: 'A',

long: 'Ala'

},

weight: {

molecular: 89.10,

residue: 71.08

},

formula: {

molecular: 'C3H7NO2',

residue: 'C3H5NO'

},

p: {

Ka: 2.34,

Kb: 9.69,

Kx: null,

l: 6.00

}

}...

....

--

--

Zdravko Kolev
Zdravko Kolev

Written by Zdravko Kolev

Manager, Product Development @ Infragistics, passionate about technology, innovation, personal growth, and team development. https://linktr.ee/ZdravkoKolev

Responses (1)