Forum



23:15

06/02/2008

Hi,
I'm using jqGrid successfully but having trouble now implementing basic advanced search feature, and have not found any similar problems/solutions by searching.
I've added icons to the navBar but clicking on Search icon appears to do nothing–what am I missing? Is the advanced search included in the standard jqGrid.min? Is it activated but not visible?
I am using jquery 1.3.2, jqGrid 3.6.5, and a few other plugins (see code)
Thanks in advanced for any help!
here is my code:
<script type="text/javascript" src="../common_ui/jquery/jquery-1.3.2.min.js"></script>
<script language="javascript" type="text/javascript" src="../common_ui/jquery-ui-1.7.3.custom/js/jquery-ui-1.7.3.custom.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/cqe_styles.css" />
<link type="text/css" href="../common_ui/css/cqe-custom-theme/jquery-ui-1.7.3.custom.css" rel="Stylesheet" />
<script language="javascript" type="text/javascript" src="../common_ui/jquery/jquery.blockUI.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="../common_ui/jquery/jquery.jqGrid-3.6.5/css/ui.jqgrid.css" />
<script language="javascript" type="text/javascript" src="../common_ui/jquery/jquery.jqGrid-3.6.5/js/i18n/grid.locale-en.js" ></script>
<script language="javascript" type="text/javascript" src="../common_ui/jquery/jquery.jqGrid-3.6.5/js/jquery.jqGrid.min.js"></script>
<script language="javascript" type="text/javascript" src="js/ae_reg_grid.js"></script>
and…
$(document).ready(function(){
jQuery("#regList").jqGrid({
url: "ae_reg_grid_fill.php?nd="+new Date().getTime(),
datatype: "json",
height: 300,
colNames:['Ref Num',
'Eff Date',
'Exp Date',
'Status',
'Warranty Dealer',
'Selling Dealer',
'File Name',
'Coverage Summary'
],
colModel:[
{name:'refnum',index:'refnum', width:50, sortable:false},
{name:'effdate',index:'effdate', width:70, align:'left', sortable:false},
{name:'expdate',index:'expdate', width:75 , align:'left', sortable:false},
{name:'status',index:'status', width:70, align:'left', sortable:false, searchoptions:{sopt:['eq','ne']} },
{name:'warr_dealer',index:'warr_dealer', width:100, align:'left', sortable:false },
{name:'sell_dealer',index:'sell_dealer', width:150, align:'left', sortable:false },
{name:'file_name',index:'file_name', width:150, align:'left', sortable:false },
{name:'cvg_summary',index:'cvg_summary', width:200, align:'left', sortable:false },
],
multiselect: false,
pager: "#regList_pager",
rowNum: 15,
caption: "Registration List",
gridview: true,
ondblClickRow: function(id){
var rId = jQuery("#regList").jqGrid('getGridParam','selrow');
if( rId != null ) {
var gRow = jQuery("#regList").jqGrid('getRowData',rId);
if( gRow.status == 'SUBMITTED' && $("#oe_status_h").val() == 'CLOSED') {
alert('Open Enrollment period is closed. This SUBMITTED registration will not be able to be endorsed or cancelled.');
}
$('#grid_wrapper').block({
message: '<br/><h2>Loading Registration…<br/><img src="../common_ui/graphics/cqe_wait.gif" /></h2>',
overlayCSS: { backgroundColor: '#000', opacity: 0.0 }
});
window.open("../module_autoenroll/ae_reg.php?r=" + gRow.refnum, "_parent");
}
else {
alert('Please double-click on another row to view');
}
}});
jQuery("#regList").jqGrid('navGrid','#regList_pager',
{ edit:false,
add:false,
del:false,
search:true,
refresh:true
},
{}, // edit options
{}, // add options
{}, //del options
{multipleSearch:true} // search options
);
});
14:02

10/08/2009

Hello!
You should remove comma before ']' in the definition of colModel. Moreover you should include jquery.searchFilter.css and jquery.searchFilter.js if jquery.searchFilter.js is not part of jquery.jqGrid.min.js which you use. For verifying you can open the file jquery.jqGrid.min.js which you use and search for "jquery.searchFilter.js" string in the comment from the first line of the file. I recommend you to load last version of jqGrid and be careful that you select "Search Plugin" on the download page. The usage of jQuery 1.4.3 can additionally make your application work more quickly because it realize more effectively the working with CSS used in jqGrid.
The usage of "?nd="+new Date().getTime() an the end of url is not needed. The parameter nd with the current timestamp will be added by jqGrid per default. The values align:'left' and multiselect: false are also default and can be removed.
Best regards
Oleg
Most Users Ever Online: 715
Currently Online:
64 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