Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
140
how to add customize query strings behind datasourceurl?
posted

Hi there,

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:

http://localhost:26591/Dictionary/Dic_Country/GetList?sort(name_en)=asc&pk=id&_=1463477978984,

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.

Parents
No Data
Reply
  • 7595
    Offline posted

    Hello Shi,

    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.

    https://www.igniteui.com/help/igtreegrid-remote-features#samples

    You can refer the following sample demonstrates how to setup the remote features of the Tree Grid: sorting, filtering and paging.

    https://www.igniteui.com/tree-grid/remote-features

    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:

    https://www.igniteui.com/grid/paging

    More more information refer the following Forum explained by martin.

    https://ko.infragistics.com/community/forums/f/ignite-ui-for-javascript/77099/remote-paging

    Please let me know if you need further assistance.

Children