Hi,
Can I get simple project sample for web api controller working with javascript client with iggrid
implementing remote paging? I have below that client javascript but have problem with api controller retrieving page/page count
and storing this somehow. thanks
$(function () { $('#grid1').igGrid({ requestType: "POST", dataSource: 'localhost/GridGetData', responseDataKey: 'Records', columns: [ { key: 'ProductID', dataType: 'string', headerText: 'ID', width: '116px' }, { key: 'Name', dataType: 'string', headerText: 'Product Name', width: '117px' }, { key: 'ListPrice', dataType: 'number', headerText: 'Price', width: '117px' }, { key: 'ModifiedDate', dataType: 'date', headerText: 'Date', width: '116px' } ], features: [ { name: 'Paging', recordCountKey: 'TotalRecordsCount', pageIndexUrlKey: 'page', pageSizeUrlKey: 'pageSize', pageSize: 10, type: 'remote' }], height: '500px', width: '100%', localSchemaTransform: true });
Hello,
We have a topic describing how to achieve remote paging on our own.
Please review it and let me know if it helps or you need something more specific.
thanks, but I see plenty of remote paging posts with questions and none complete sample project how to do it right, number of these post indicates it is not so clear. I have working example with mvc controller as data source but I would love to see plain web api or web service solution with javascript client. I'm sure you have simplest possible project showing how it works.
BTW should database return all records to the controller/service or page by page? because your example show always the former.
The sample I made for you was to demonstrate the usage of manual paging. You can decide where to generate the data and which endpoint to use for sending it to the grid.
I believe it should be done in similar way when using webapi.
Can you be more specific about the issue you are facing implementing the webapi?
not sure if you even read my questions, samples with MVS I have and they're working but this is not real world scenarios. I'm looking for sample with data being generated in webapi service where I call with http client.
Problem is I don't want to load all data each time next page button is called and then do data skip. Got to be a better way.
So you don't have sample project with web api/web service usage I understand.
For the purpose of the demo I only made a simple list with simple data, no need access data bases and generate some specific data.
I don't have a sample with WebApi but sending and receiving data to igGrid is the same. It doesn't matter if your endpoint is WebApi or not.
Also if I'm missing something I'll be glad to help if you send me a small isolated sample demonstrating the issue you are facing.
useless support, outta here
It is really up to the application how you pass the records into the response. I agree that in a real world scenario, you will extract only those records from data base that are required for the current page.
I would really like to be in favor of you, but it sounds like you need application logic outside the scope of igGrid. Even so if you are more specific on the issue you are facing I could try helping out.
Do you have troubles accessing your data base or binding the igGrid to WebAPI?