New to Kendo UI for Angular? Start a free 30-day trial
Binding the Grid to JSON Data
Updated over 6 months ago
Environment
| Product | Progress® Kendo UI® for Angular Data Grid |
Description
How can I bind the Kendo UI for Angular Grid component to JSON data?
Solution
To display JSON data inside the Grid component:
-
Use either the built-in
dataproperty or theDataBindingDirectiveand pass the JSON data.html<kendo-grid [kendoGridBinding]="gridData"> ... </kendo-grid> -
Set the
fieldproperty of the Grid columns to the corresponding attribute in the JSON data.html<kendo-grid ...> <kendo-grid-column field="ProductID" ...> </kendo-grid-column> <kendo-grid-column field="ProductName" ...> </kendo-grid-column> </kendo-grid>
The following example demonstrates the suggested approach for binding the Grid component to JSON data.
Change Theme
Theme
Loading ...