Forum


Tony,
I can't get the search options to work in latest release (3.5.2). Below is my advance search attempt. The filter option does not appear on the pager bar. I've looked at the examples and have read the download notes. What am I doing wrong?
Thanks,
Jim
MY CSS & JS:
<link rel="stylesheet" type="text/css" media="screen" href="../css/ParViewForms.css" />
<link rel="stylesheet" type="text/css" media="screen" href="../css/basic.css" />
<link rel="stylesheet" type="text/css" media="screen" href="../css/jquery.autocomplete.css" />
<link rel="stylesheet" type="text/css" media="screen" href="../css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" media="screen" href="../css/jquery.searchFilter.css" />
<link rel="stylesheet" type="text/css" media="screen" href="../css/jquery-ui-1.7.2.custom.css" />
<script src="jquery.js" type="text/javascript" ></script>
<script src="js3-5/grid.locale-en.js" type="text/javascript"></script>
<script src="js3-5/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="js/localdata.js" type='text/javascript'></script>
<script src="js/jquery.autocomplete.min.js" type="text/javascript"></script>
MY Grid:
<script>
// ********************************************************************************************
// Single List Option
// ********************************************************************************************
$(document).ready(function()
{
$("#CClist").jqGrid(
{url:'Users.cfc?method=GetClosedCases&thisBizOrg=<cfoutput>#session.bizorg_objid#&thisDSN=#Application.DSN#&thisAcctTyp=#session.AcctTyp#&thisTZOff=#session.TZOff#&thisTZ=#session.TZ#&thisSiteID=#form.Site_ID#&thisAltSiteID=#form.Alt_Site_ID#&thisDatetyp=#form.Datetyp#&thisFromDate=#form.from_date#&thistoDate=#form.to_date#&thisFldName=#form.FieldName#&thisTestC=#form.testcondition#&thisQData=#Form.QData#&thisSrt1=#form.srt1#&thisSO1=#form.srtOrd1#'</cfoutput>, //CFC that will return the users
datatype: 'json', //We specify that the datatype we will be using will be JSON
colNames:['Case ID','Site ID','Reported Problem','Closing Summary','Condition','Status','Priority','Contact','Created','Sort Date','Closed','Sort Closed','Alt Site ID','Cust Ref No','Acct Name','Email'], //Column Names
//The Column Model to define the data. Note you can make columns non sortable, specify width, alignment, etc.
colModel :[
{name:'id_number',index:'id_number', align:"center", sorttype:"text", width: 70},
{name:'site_id',index:'site_id', align:"center",sorttype:"text", width: 60},
{name:'title',index:'title', align:"left", width: 100, sorttype:"text"},
{name:'closing_summary',index:'closing_summary', align:"left", width: 100, sorttype:"text"},
{name:'condition',index:'condition', align:"center", sorttype:"text", width: 54},
{name:'status',index:'status', align:"center", sorttype:"text", width: 60},
{name:'priority',index:'priority', align:"center", sorttype:"text", width: 60},
{name:'last_name',index:'last_name', align:"center", sorttype:"text", width: 60},
{name:'creation_time',index:'creation_time', align:"center", width: 90, formatter:'date', formatoptions:{srcformat: 'm/d/Y H:i:s',newformat: '<cfoutput>#session.myGridDateFormat#</cfoutput>'}}, // m/d/Y H:i:s
{name:'sort_creation_time',index:'sort_creation_time', align:"center", hidden: true},
{name:'case_close_date',index:'case_close_date', align:"center", width: 90, formatter:'date', formatoptions:{srcformat: 'm/d/Y H:i:s',newformat: '<cfoutput>#session.myGridDateFormat#</cfoutput>'}}, // m/d/Y H:i:s
{name:'sort_case_close_date',index:'sort_case_close_date', align:"center", hidden: true},
{name:'alt_site_id',index:'alt_site_id', align:"center", sorttype:"text", width: 60},
{name:'x_cust_ref_no',index:'x_cust_ref_no', search:true, sorttype:"text", width: 60},
{name:'name',index:'name', search:false, sortable:false, width:60},
{name:'e_mail',index:'e_mail', search:false, sortable:false, width: 80, formatter:'email'}
],
autowidth: true,
cellEdit: false,
pager: $('#pager'), //,#pager2 The div we have specified, tells jqGrid where to put the pager
rowNum: <cfoutput>#session.maxlines#</cfoutput>, //Number of records we want to show per page
sortorder: "", //Default sort order - desc
recreateFilter : true,
sortname: "priority", //Default sort column
viewrecords: true, //Shows the nice message on the pager
caption: 'Case Query', //Grid Name
height:'auto',
mtype:'GET',
postdata: "",
toolbar:[false,"top"],//Shows the toolbar at the top. I will decide if I need to put anything in there later.
// main grid code below
//The JSON reader. This defines what the JSON data returned from the CFC should look like
jsonReader: {
root: "ROWS",
page: "PAGE",
total: "TOTAL",
records:"RECORDS",
userdata: "USERDATA",
cell: "",
id: "0",
subgrid: {root: "ROWS", repeatitems: true, cell: "",id:"0"}
}
}
);
}).navGrid('#CCList',
{
edit:false,add:false,del:false,search:true,refresh:true
},
{}, // edit options
{}, // add options
{}, //del options
{multipleSearch:true} // search options
);
</script>
**MY Divs
<div id="search"></div>
<div id="g1">
<table id="CClist" cellpadding="0" cellspacing="0"></table>
<div id="pager" style="text-align:center;"></div>
</div>
05:26

Moderators
30/10/2007

As of your code you should
....navGrid('#pager',
{
edit:false,add:false,del:false,search:true,refresh:true
},
{}, // edit options
{}, // add options
{}, //del options
{multipleSearch:true} // search options
);
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
70 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66