JavaScript Map object

1 Answer 555 Views
Grid
Artur
Top achievements
Rank 1
Artur asked on 01 Dec 2021, 02:02 PM | edited on 01 Dec 2021, 02:07 PM
Hi,
Can we pass kendo-grid map object? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map
will the grid work with Map objects ?

1 Answer, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 06 Dec 2021, 08:01 AM

Hello Artur,

The Kendo UI for Angular Grid is designed to display tabular data based on a collection (array) of objects with identical structures (properties). Each object (data item) property to be displayed in the Grid needs to be represented by a Grid column configuration with its field option bound to the respective object property name:

https://www.telerik.com/kendo-angular-ui-develop/components/grid/get-started/#toc-using-the-component

This is why the Grid can be bound to an array, object of type GridDataResult (when paging is enabled) that contains data and total properties, or an Observable of any of these two types:

https://www.telerik.com/kendo-angular-ui-develop/components/grid/data-binding/

To sum up - the Grid does not support binding to Map objects, but the Map or other custom data structure can be manipulated/adjusted beforehand so that the appropriate data item objects are extracted from it and an array or GridDataResult object containing the necessary data items is constructed.

I hope this helps.

Regards,
Dimiter Topalov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Artur
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Share this question
or