Description
This method uses
colModel names and
url parameters from jqGrid
Calling: jQuery("#grid_id").searchGrid( options );
options
top : 0 the initial top position of search dialog
left: 0 the initinal left position of search dialog
If the left and top positions are not set the dialog apper on
upper left corner of the grid
width: 360, the width of serch dialog - default 360
height: 70, the height of serch dialog default 70
modal: false, determine if the dialog should be in modal mode default is false
drag: true,determine if the dialog is dragable default true
caption: "Search...",the caption of the dialog
Find: "Find", the text of the button when you click to search data default Find
Reset: "Reset",the text of the button when you click to clear search string default Reset
dirty: false, applicable only in navigator see the last example
These parameters are passed to the url
sField:'searchField', is the name that is passed to url the value is the name from colModel
sValue:'searchString',is the name that is passed to url the value is the entered value
sOper: 'searchOper', is the name that is passed to the url the value is the type of search - see sopt array
// translation string for the search options
odata : ['equal', 'not equal', 'less', 'less or equal','greater','greater or equal', 'begins with','ends with','contains' ],
// if you want to change or remove the order change it in sopt
sopt: null // ['bw','eq','ne','lt','le','gt','ge','ew','cn']
by default all options are allowed. The codes are as follow:
bw - begins with ( LIKE val% )
eq - equal ( = )
ne - not equal ( <> )
lt - little ( < )
le - little or equal ( <= )
gt - greater ( > )
ge - greater or equal ( >= )
ew - ends with (LIKE %val )
cn - contain (LIKE %val% )