Forum


02:29

07/06/2009

Hello - I am working with my first jqgrid and have read through the documentation pretty extensively. However, I seem to be having some trouble with trying to get the Multi Search Feature to work.
Here is the code I have for my javascript currently:
<script src="custom/include/javascript/jquery-1.2.6.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" media="screen" href="cfm_framework/include/javascript/common/jqgrid/themes/steel/grid.css" />
<script src="cfm_framework/include/javascript/common/jqgrid/jquery.jqGrid.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript">
var $j = jQuery.noConflict();
$j(document).ready(function() {
$j("#opp_grid").jqGrid({
url:'CFM_HandleAjaxCall.php?controller=Opportunities&method=list_for_new_grid',
datatype: 'xml',
mtype: 'GET',
colNames:['','Date Entered', 'Last Name','First Name','Opportunity Name','Stock #','Contact Type','Sales Stage','Assigned User'],
colModel :[
{name:'id', index:'id', width:100},
{name:'date_entered', index:'date_entered', width:100 ,formatter:'date'},
{name:'last_name', index:'last_name', width:80, align:'right'},
{name:'first_name', index:'first_name', width:80, align:'left'},
{name:'name', index:'name', width:160},
{name:'Stock_Number', index:'Stock_Number', width:50, sortable:false},
{name:'contacttype_c', index:'contacttype_c', width:80, align:'right'},
{name:'sales_stage', index:'sales_stage', width:80, align:'right'},
{name:'assigned_user_id', index:'assigned_user_id', width:80, align:'right'}
],
pager: $j('#pager'),
rowNum:10,
rowList:[10,20,30],
sortname: 'id',
sortorder: "desc",
viewrecords: true,
toolbar : [true,"top"],
imgpath: 'cfm_framework/include/javascript/common/jqgrid/themes/steel/images',
caption: 'Opportunities List'
});
$j("#t_opp_grid").height(25).hide().filterGrid("opp_grid",{gridModel:true,gridToolbar:true});
$j("#sg_date_entered").datepicker({dateFormat:"mm/dd/yyyy"});
$j("#opp_grid").navGrid('#pager',{edit:false,add:false,del:false,search:false,refresh:false})
.navButtonAdd("#pager",{caption:"Search",title:"Toggle Search",buttonimg:gridimgpath+'/find.gif',
onClickButton:function(){
if($j("#t_opp_grid").css("display")=="none") {
$j("#t_opp_grid").css("display","");
} else {
$j("#t_opp_grid").css("display","none");
}
}
});
});
Here is what is on my html page:
<table id="opp_grid" class="scroll"></table>
<div id="pager" class="scroll" style="text-align:center;">
My table is showing up fine. However, there is no search button at all anywhere.
Any help or ideas?
Thanks!
Most Users Ever Online: 715
Currently Online:
26 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