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 });
thanks, but this is not what I meant,
Your sample done it through mvc controller not apicontroller,
I was thinking about simple WebApi service project with javascript client...
Data should be generated http call to webapi service so you cannot put it in the constructor.
Hello,
I've prepared a sample for you demonstrating the manual remote paging. I believe this is what you need. Please review it and let me know if you have some questions on it.
7028.RemotePaging.zip
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.
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.