Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Integrated search toolbar on 3.6.1 showned under the table
09/12/2009
10:19
Avatar
sirshurf
Member
Members
Forum Posts: 43
Member Since:
06/10/2009
sp_UserOfflineSmall Offline

Ok, probably something simple and stupid...

I have switched to 3.6.1, and since this was not wokring for me in 3.5 probably the error is not in it but...

I have a JQGRID that selects data from a URL, and I would like to search on it. I would like to use Integrated search toolbar but...

For some reason the searche fields are not showned on location, but UNDER the JQGRID.

$("#modal").dialog({ title:'Search item', bgiframe: true, modal: true, autoOpen: false, width: '61%' //51% is for ICAT..IPACK }); gridimgpath = "../styles/images"; jQuery("#list2").jqGrid({ datatype: 'json', url: 'ItemTB.php?SearchId='+$("#itemNumber").val()+'&SearchDesc='+$("#description").val(), //call index.php to fill the jQuery mtype: 'GET', cache: false, height: '350', //table //search:true, //rowList:[10,20,30,40,50], colNames:['Item Number', 'Description', 'Code Stock', 'Price', 'Pack size', 'Warehouse AA', 'Warehouse ', 'Warehouse ', 'Warehouse ', 'Warehouse ', ], colModel:[ {name:'ICAT',index:'ICAT', width:120,search:true,stype:'text', sortable:false}, {name:'IDSCO',index:'IDSCO', width:280,search:true, sortable:false}, {name:'ICS',index:'ICS', width:80,search:false, sortable:false}, {name:'IPRC1',index:'IPRC1', width:90,align:"right",search:false, sortable:false}, {name:'IPACK',index:'IPACK', width:70, sortable:false,search:false}, {name:'IQTY1',index:'IQTY1', width:100,align:"right",search:false, sortable:false}, {name:'IQTY2',index:'IQTY2', width:100,align:"right",search:false, hidden:true, sortable:false}, {name:'IQTY3',index:'IQTY3', width:100,align:"right",search:false, hidden:true, sortable:false}, {name:'IQTY4',index:'IQTY4', width:100,align:"right",search:false, hidden:true, sortable:false}, {name:'IQTY5',index:'IQTY5', width:100,align:"right",search:false, hidden:true, sortable:false}, ], pager: jQuery('#pager2'), imgpath: gridimgpath, multiselect: false, gridview : true, //toolbar : [true,"top"], onSelectRow: function(id) { $("#itemNumber").val(id); $("#description").val($("#list2").getCell(id,"IDSCO")); $('#modal').dialog('close'); }, jsonReader : { root: 'rows', page: 'page', total: 'total' , records: 'records' } }); jQuery("#list2").jqGrid('navGrid','#pager2',{edit:false,add:false,del:false,search:false,refresh:false}); jQuery("#list2").jqGrid('navButtonAdd',"#pager2",{caption:"Search",title:"Toggle Search", onClickButton:function(){ if(jQuery("#filter").css("display")=="none") { jQuery(".HeaderButton","#gbox_list2").trigger("click"); jQuery("#filter").show(); } } }); jQuery("#list2").jqGrid('navButtonAdd',"#pager2",{caption:"Clear",title:"Clear Search",buttonicon:'ui-icon-refresh', onClickButton:function(){ var stat = jQuery("#list2").getGridParam('search'); if(stat) { var cs = jQuery("#filter")[0]; cs.clearSearch(); } } }); jQuery("#filter").jqGrid('filterGrid',"list2", { gridModel:true, gridNames:true, formtype:"vertical", enableSearch:true, enableClear:false, autosearch: false, afterSearch : function() { jQuery(".HeaderButton","#gbox_list2").trigger("click"); jQuery("#filter").css("display","none"); } } );
and my HTML is:

<div id="modal" title="Search">
	<table id="list2" class="scroll" cellpadding="0" cellspacing="0"></table>
	<div id="pager2" class="scroll" style="text-align:center;"></div>
	<div id="filter" style="margin-left:30%;display:none">Search</div>	
</div>

11/12/2009
01:15
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

You should use filterToolbar instead. I do not see a code for this.

See demos.

Best Regsrds

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.

14/12/2009
12:40
Avatar
sirshurf
Member
Members
Forum Posts: 43
Member Since:
06/10/2009
sp_UserOfflineSmall Offline

Ok, got it....

In the "Integrated Search Example" the HTML part is incorrect (and thrown me off...)

<table id="s2list"></table> <div id="s2pager"></div> <div id="filter" style="margin-left:30%;display:none">Search Invoices</div> <script src="search2.js" type="text/javascript"> </script>

and should be: 
<table id="s3list"></table>
<div id="s3pager"></div>
<script src="search3.js" type="text/javascript"> </script>
10x for the great plugin.
Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
59 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information