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,
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?
useless support, outta here
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.
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.
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?