Display request of XDataWebClient in WebDbGrid



I have an XDataWebClient via which WebInvoke Json data is requested. This data should be passed to an XDataWebDataSet with XDataWebDataSet.SetJsonData for display in the WebDBGrid.

procedure TfClientDatamodul.LoadOrders;
  procedure OnSuccess(Response: TXDataClientResponse);
  begin
    XDataWebDataSetOrders.Close;
    //XDataWebDataSetOrders.Connection:=NIL;
    //XDataWebDataSetOrders.EntitySetName:='';
    XDataWebDataSetOrders.SetJsonData(Response.Result);
    XDataWebDataSetOrders.Open;
  end;
begin
  XDataWebClientOrders.RawInvoke('IOrderService.GetOrders', ['10/10/2018', '10/10/2019'], @OnSuccess);
end;


When I open the XDataWebDataSet I get the message: 
ERROR: Connection not assigned fHelpContext::0 


How can I display the data from the XDataWebClient in a WebDBGrid?


Thanks for your help

Hi,
Wrong, I meant Response not Request. sorry

Does anyone have an idea which is the right way?

That message means you need to assign a TXDataWebConnection to the dataset. Since you are retrieving data yourself, the probable reason for this message is that you haven't defined any persistent fields in the dataset. When this happens the dataset needs information about the model in Xdata server to know which fields to dynamically create from the EntitySetName (which you also set empty).


Make sure you create the fields in advance and the message should not appear.