FNC Grid and LoadfromJSON

I have been using successfully the WebCore String Grid with just a WebHttpRequest. by getting the data json, converting the received json string to a json object with a simple javascript asm block containing J = JSON.parse(S). Then I load the json variable into a string grid with a simple stringgrid.loadfromJson(J).
At least for getting data, Is simpler, faster and more reliable for me than using datasource, connection, client in the delphi style workflow. I did a whole ecosystem of functions to support my applications, and they are working great, so I would like to use it.

I wanted now to use the FNCgrid instead and I discovered that it does not have a loadFromJson method.
Since my data is now in memory as a json variable (or as a string json) I am trying to figure out how to use the available methods in FNCgrid.
So my question is, using just a FNCgrid and a variable in memory, how can I do it with the available methods, just as the regular webcore string grid loadFromJson method? Clearly the variable is not an URI or File and I would prefer not to save it to a json file just to load it again. There must be a way.
Any suggestion is appreciated.

Thanks,
JD

Hi,

The LoadFromJSONFile or LoadFromJSONStream is actually from the inherited sub class TTMSFNCCustomControl to save/load the grid settings. It does not have a way to load JSON as data inside the grid. We are currently working on a new version and will look into loading data from JSON.

Thanks Pieter. That would be great.

Hi,
When we can use FNCGrid in TMS Web Core loading data from a Json?
The management of data in Json format seems to me the bare minimum to use FNCgrid decently on the web.
Thanks

There is not a built-in function at this time. Technically, this would only make sense to load from a flat JSON array.
It is indeed a common pattern in web apps. So, we'll discuss, maybe to consider adding a LoadFromJSONArray method.

:+1: