4

I'm not sure how to best phrase this, especially while trying to research it. I am trying to add an additional parameter to the search string when my page loads a jqgrid:

http://localhost/jqgrid.cgi?_search=false&nd=1308125954351&rows=25&page=1&sidx=Change&sord=asc

I simply want to append an additional "value=something" to the URL string to use as an argument for my SQL call. This parameter is not a value contained within the grid, it is merely a value that I wish to use in a WHERE clause from a page that is used to build the grid.

Desired result:

http://localhost/jqgrid.cgi?_search=false&nd=1308125954351&rows=25&page=1&sidx=Change&sord=asc&value=something

Mose
  • 541
  • 1
  • 11
  • 27

1 Answers1

15

If you use mtype:"GET" you can use postData to add new parameter:

postData: {
    value: "something"
}

or even

postData: {
    value: function() {
        return $("#anyPageElement").val(); // or other method which read the value
    }
}

see here for details.

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