i'm doing some researches using igniteui 16.1, i want to use some of the iggrid's features (paging,sorting etc) remotely , so I use datasourceurl property like this: dataSourceUrl: "/Dictionary/Dic_Country/GetList".
and while sorting or changing page in iggrid, iggrid passes a url to server with query strings like this:
Meanwhile , I have some input elements in my page，i need to pass the data in input elements to server side while sorting or changing page, i want to add my own parameters behind datasourceurl, but it seems like there is no way to edit iggrid's datasourceurl, i want to know while doing sorting , paging remote, is there any possiable to pass some more data to server side?
Sorry for my poor english, any reply will help, thank you.
When the grid is set up to use remote features, Ajax requests are used for data interactions. Having remote features such as Paging allows for working with very large sets without the need to bind the igGrid to the entire data initially which can greatly benefit performance.
In order to take advantage of the remote features functionality the controller action method responsible for Sorting, Filtering and Paging should be decorated with GridDataSourceAction attribute.
You can refer the following API document describe more about Remote features.
You can refer the following sample demonstrates how to setup the remote features of the Tree Grid: sorting, filtering and paging.
If you're not implementing paging yourself then in order for remote paging to work you need to set DataSourceUrl to point to an action method decorated with GridDataSourceAction attribute. Check out this sample which demonstrates remote paging:
More more information refer the following Forum explained by martin.
Please let me know if you need further assistance.
Thanks for your reply.
Actually in order to use remote features, I do decorate the controller action method responsible for Sorting, Filtering and Paging with GridDataSourceAction attribute, and I found out igNite grid sent a request back and added some query strings in the dataSourceUrl automaticly, the Url generated like this: http://localhost:26591/Home/CrewList?sort(name)=desc&page=0&pageSize=12&pk=id&_=1465226017812.
But in my application , i have to allow users to enter something in a input element in the page, when using remote features , i need to fetch the user input, and add the user input in query string too, so i can handle the user input in the controller action,and finally the url sent back might be like this :
http://localhost:26591/Home/CrewList?sort(name)=desc&page=0&pageSize=12&pk=id&_=1465226017812&userinput=something(this part of query string in bold is what i want to add in the generated url).
So my question is, when using remote features, is it possible to add some query strings in the generated datasourceUrl?
thanks a lot.
When you need to change something in the URL, before it is requested, you can use the urlParamsEncoding and urlParamsEncoded grid events, this forum topic can help:
for more information about dynamic datasource of iggrid in the following forum Vasya provided very usefull information and a sample application.
Please let me know if I may be further assistance.
That's really worked for me, thank you very much
Thank you for the update.