Hi!
I have jqgrid :
jQuery("#list").jqGrid( {
url : 'ajax/get',
datatype : 'json',
mtype : 'POST',
colNames : [
'Date',
'ID'
],
colModel : [{
name : 'date',
index : 'date',
width : 60,
align : 'center',
searchoptions:{sopt:['gt', 'lt']}
},{
name : 'id',
index : 'id',
width : 40,
align : 'center',
searchoptions:{sopt:['eq']}
}]
//.......
});
Is there a way to set "odata" option in "Date" column. Now it's showing "greater" and "less". I need - "from" and "to".
I try this :
colModel : [{
name : 'date',
index : 'date',
width : 60,
align : 'center',
searchoptions:{sopt:['gt', 'lt'], odata:['from', 'to']}
}
It's not working, still showing "greater" and "less". Tried this :
$(document).ready(function(){
$.jgrid.search = {
odata : ['equal','not equal', 'to', 'less or equal','from','greater or equal', 'begins with','does not begin with','is in','is not in','ends with','does not end with','contains','does not contain']
};
$.extend($.jgrid.search);
});
It's replaces "greater" to "from" and "less" to "to" in all columns, but I need only in "Date" column. Is there a way to do it?
Thanks.