jQWidgets Forums

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Angular 4 HttpClient and jqxGrid Angular 4 HttpClient and jqxGrid #97254

    margozzi
    Participant

    I figured it out. Once again, I have to say I am seriously considering not recommending this product do to the terrible API docs.


    margozzi
    Participant

    Seems to be related to the virtualMode and rendergridrows. I had those there before while trying to figure this out.
    If I remove them, the grid no longer makes network request and sorts and filter locally. If I put them back, I get the loop.

    beforeprocessing(data) {
    this.source.totalrecords = data.count;
    }

    renderGridRows(params: any): any {
    return params.data;
    }


    margozzi
    Participant

    I did as you pointed out and got further. I am able to get the grid to render a bunch of rows.
    However, now I am trying to get remote sorting working. I have bound a function to the OnSort event.
    In that call I make an asynchronous call for sorted rows. WHen the response comes back I update the data as before, on initial load.
    Then I make the call to update the data like this:
    updateData = (endpoints: ListResponse<Endpoint> ) => {
    this.source.localdata = endpoints._embedded.items;
    this.source.totalrecords = endpoints.count;
    this.grid.updatebounddata(‘cells’);
    }
    The call to updatebounddata gets me into an infinite loop. It seems to cause the OnSort callback to be called, and round and round we go.


    margozzi
    Participant

    I think you are assuming way to much on my part. What do you mean “execute the new jqxGrid dataBinding”
    Are you saying I have to instantiate a new grid each time I get data? Am I not able to simply replace the current data with new data?

    I need a way to Determine the current sorting choices, filtering choices and paging choices made by the user and create an XHR request using the HttpClient in Angular 4.3. Then when I get a response, I need to update the existing grid widget with new data.

    So, how do I determine the needed parameters for my XHR call. And when I get the response, how do I populate the grid?
    I see no examples like this. Your document ion seems to mostly be examples and not any real explanation of things.

Viewing 4 posts - 1 through 4 (of 4 total)