Hello,
I get a Response.Result from a service and like to load it via LoadFromJSon to a TWebStringGrid.
procedure TForm1.btnJSArrayClick(Sender: TObject);
procedure OnResponse(Response: TXDataClientResponse);
begin
Grid_Abteilung.LoadFromJSON(); //AURL?
end;
begin
XMyClient.RawInvoke('IData_xChangeService.Get_Abteilung_JSArray',[], @OnResponse);
end;
Is it possible to link the Resonse.Result (TJSONArray) as an AURL to the LoadFromJSON of the TWebStringGrid?
Many thanks
Patrick
wlandgraf
(Wagner Landgraf)
2
Can't you just manually provide the directly URL of IData_xChangeService.Get_Abteilung_JSArray method to the LoadFromJSON method?
One more question. I am missing the Col Titles. I have a JSArray like below:
[
{
"AbteilungsID": 10,
"Abteilung": "Verkauf",
"Test": "0"
},
{
"AbteilungsID": 20,
"Abteilung": "Anwendung & Entwicklung",
"Test": "0"
}
]
But in the fixed frist Row I have not "AbteilungsID", "Abteilung", "Test". Can I insert the, too?
Many thanks.
P.S.: It is cool that this also works:
If someone is interested...
wlandgraf
(Wagner Landgraf)
5
That's up to the server-side. I don't know how your server-side is implemented.