Hello Team,
We are using ig-grid angular in our project. Right now using local pagination in which all the records are loaded at once and based on it, pagination details are shown. Need to implement remote pagination in which only selected records will be fetched. I have seen remote pagination example of ig-grid and don't think we can use those features as it is as we are only using ignite components on the frontend, not for the backend. Backend service to load the records is generic and is written in c#.
// Angular
<ig-grid [(options)]="gridOptions" [(dataSource)]="wrapperObjectDataSource" ></ig-grid>
// c#
[HttpPost]public IActionResult GetRecords([FromBody] CustomModel model){try{GenericSearchResult result = searchService.getRecords(searchMetadata);
return Ok(result);}catch (Exception ex){_logger.LogError(ex.Message);return BadRequest(ex.Message);}}
I have seen examples wherein remote pagination, the service call is made to c# service which uses ignite metadata (annotation). In my application, we provide filtering criteria also to the search service by using CustomModel object. Need to know how remote pagination can be implemented using angular component and c# service.
Thanks in advance.
Hello,
Angular wrappers for Ignite UI do not provide automatic handling for remote data scenarios. So you'll have to handle the remote features manually (it has a section about handling paging manually). You can find a sample demonstrating this in jQuery.
Also you should involve Angular HttpClient and Observables as this is the Angular way to work with remote data. Here a demo about that and its source code.