Posted 5 September 2021, 7:11 am EST - Updated 3 October 2022, 3:34 am EST
How to bind dynamically generated json to flexgrid?
Posted by: ajanaspa on 5 September 2021, 7:11 am EST
-
-
Posted 5 September 2021, 10:07 pm EST
Hello,
You can update the itemsSource of the grid anytime as per your requirements.
flexGrid.itemsSource = <dynamic json data>;
Also, the JSON you have provided is not supported in the FlexGrid, because the FlexGrid data source takes either an array, array-of-object, JSON(in array-of-object structure ), an instance of IcollectionView. If you pass a JSON to the FlexGrid you need to make sure it is in that structure only.
I have Updated the JSON a bit to show the closest desired result. Please refer to the sample link below demonstrating the same:
https://stackblitz.com/edit/js-we11pg?file=index.js
Regards