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
145
igGrid Sorting 'remote' sortUrlKey usage (oData Conventions)
posted

Hi,

I am using igGrid in non mvc project.

I want to use Sorting, Grouping of type 'remote' with datasourceURL specified

 var pageUrl = $get('serverURL').value + 'Core/UserControls/GridService.svc/GridOperations?obj='+params;

 features: [
                        {
                            name: "Sorting",
                            type: "remote",
                            sortUrlKey: "Sort",}]

Now the problem is sotURlkey thing is not working for me, When the made to server i cant identify the column and the direction.

Could any one help me, I'm Stuck here.

Parents
No Data
Reply
  • 24671
    Suggested Answer
    posted

    Hi,

    By default, sorting/paging/filtering/ etc params are encoded using OData. when you change the sortUrlKey and other similar properties, you are making it custom, so it's no longer "OData". On the server, in order to get the values for those keys, you need to use your server framework's API in order to get the request params. Or, if you are exposing it as a web service, they can be mapped to service method parameters. 

    here is a tutorial about that:

    http://msdn.microsoft.com/en-us/library/cc668788.aspx

    Thanks,

    Angel

Children