DIR : /home/kozerus/public_html/ko_center/js/jqgrid_demo35/search3.html

/home/kozerus/public_html/ko_center/js/jqgrid_demo35

<div style="font-size:12px;">
    This example demonstartes a new filterToolbar method. When we call this method the search<br>
    is placed above the header columns. This method is similar to filterGrid, but resolves the issue<br>
	related when we resize the coulmns.
</div>
<br />
<table id="s3list" class="scroll" cellpadding="0" cellspacing="0"></table>
<div id="s3pager" class="scroll" style="text-align:center;"></div>
<script src="search3.js" type="text/javascript"> </script>
<br />
<div style="font-size:12px;">
<b> HTML </b>
<XMP>
<table id="s2list" class="scroll" cellpadding="0" cellspacing="0"></table>
<div id="s2pager" class="scroll" style="text-align:center;"></div>
<div id="filter" style="margin-left:30%;display:none">Search Invoices</div>
<script src="search2.js" type="text/javascript"> </script>

</XMP>    
<b>Java Scrpt code</b>
<XMP>
...
var mygrid = jQuery("#s3list").jqGrid({
   	url:'search.php?q=1',
	datatype: "json",
	width: 700,
   	colNames:['Inv No','Date', 'Client', 'Amount','Tax','Total','Notes'],
   	colModel:[
   		{name:'id',index:'id', width:65},
   		{name:'invdate',index:'invdate', width:90,searchoptions:{dataInit:function(el){$(el).datepicker({dateFormat:'yy-mm-dd'});} }},
   		{name:'name',index:'name', width:100},
   		{name:'amount',index:'amount', width:80, align:"right"},
   		{name:'tax',index:'tax', width:80, align:"right", stype:'select', editoptions:{value:":All;0.00:0.00;12:12.00;20:20.00;40:40.00;60:60.00;120:120.00"}},		
   		{name:'total',index:'total', width:80,align:"right"},		
   		{name:'note',index:'note', width:150, sortable:false}		
   	],
   	rowNum:10,
   	mtype: "POST",
   	rowList:[10,20,30],
   	imgpath: gridimgpath,
   	pager: '#s3pager',
   	sortname: 'id',
    viewrecords: true,
	rownumbers: true,
    sortorder: "desc",
	gridview : true,
    caption:"Toolbar Search Example"
})
.navGrid('#s3pager',{edit:false,add:false,del:false,search:false,refresh:false})
.navButtonAdd("#s3pager",{caption:"Toggle",title:"Toggle Search Toolbar", buttonicon :'ui-icon-pin-s',
	onClickButton:function(){
		mygrid[0].toggleToolbar()
	} 
})
.navButtonAdd("#s3pager",{caption:"Clear",title:"Clear Search",buttonicon :'ui-icon-refresh',
	onClickButton:function(){
		mygrid[0].clearToolbar()
	} 
});
mygrid.filterToolbar();

</XMP>
<b>PHP with MySQL</b>
<XMP>
See Multiple search in What is new in 3.3 version.
</XMP>
</div>
//


koh5_pano



Your browser does not support the HTML5 canvas element.


Drag mouse to navigate.

Navigation





17.Aug.2010, Martin Wengenmayer