Skip to content

Binding to nested data #1

@brianlagunas

Description

@brianlagunas

Need a sample that shows how to have a column data bound to a nested property of the underlying data item.

This example assumes a collection of objects that have a user property which is an object with it's own properties we wish to display in the grid.

{
id: 1,
companyName: "IG",
user: [
  {
    name: "brian",
    email: "something",
    registered: true
  },
 ],
}
<igx-column field=”user” header=”User Details”>
     <ng-template igxCell let-cell=”cell”>
          {{ cell.value.name }} | 
          {{ cell.value.email }} | 
          {{ cell.value.registered }} | 
     </ng-template>
</igx-column>

Metadata

Metadata

Assignees

No one assigned

    Labels

    gridadd sample to the grid componentnew sampleRequest a new sample be added

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions