0

What's the equivalent of flexigrid's params in jqgrid?

$('#bsDetail').flexigrid({
    @* refactor, avoid parameters in url 
    url: '/Area/Location/Details?id=@(Guid.Empty.ToString())', *@

    url: '/Area/Location/Details',
    params : [ { name : 'id', value : '@Guid.Empty' } ],
Green Lantern
  • 858
  • 10
  • 21

1 Answers1

1

If you use default HTTP GET (mtype:'GET') the jqGrid equivalent will be

$('#bsDetail').jqGrid({
    url: '/Area/Location/Details',
    postData: { name : 'id', value : '@Guid.Empty' }
    // ...
});

Moreover if the URL parameters are no constants you can consider to use postData having functions as the properties (see here);

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798