How to implement remote paging for iggrid with custom API

391 views Asked by At

I'm trying to integrate iggrid from Ignite UI to my SPA Angular 4 application. I have custom API and I want to implement remote paging. My API has different names of parameters and returns items in content and total number in headers. I also need to add some headers to request.

Can I somehow do request by myself and just feed all necessary data to iggrid or do I really need to use iggrid to ask for data directly?

I know I can set iggrid datasource to array of data but if I do it this way I'm not able to set total count of items on the server. I know I can use responseDataKey, but I don't know how to customize requests and how to tell grid to read data from headers. I've already seen this: https://www.infragistics.com/community/forums/p/108642/511554.aspx#511554

Can anyone help?

1

There are 1 answers

1
dkamburov On

Set the datasource array and on dataBinding specify the totalRecordsCount with the datasource method.

        dataBinding: function(evt, ui) {
            ui.dataSource.totalRecordsCount(1234);
        },