Forum
01:47
02/05/2013
Hi,
I am using the toolbar search facility in one of my grids and would like to enable the display of the icon/graphic for selecting the operation type ("=" for "eq", "<" for "lt" etc.) Two questions:
1. How do I turn on the display of these graphics?
2. How do I enable the selection of a different search operation from the list of operations allowed for a column?
Thank you
11:07
Moderators
30/10/2007
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.
17:42
02/05/2013
In regard to the demo, I have looked at it, and have implemented the features that, according to the instructions and example on the page, are necessary for toolbar searching, as follows:
1. Adding a "searchoptions:{sopt:['eq',...]}" item to the colModel field definition.
2. Including a "$('#mylist').jqGrid('filterToolbar',{searchOperators : true});" line to show the toolbar.
BTW, "search: true" is missing from the colModel in the example code on the page
When I implement the above logic in my page, the search fields appear, and can be used to submit a search to the server. But there are no operator selection graphics displayed on the left side of each search text box.
So I am missing something, but am not sure what it is.
11:32
05/07/2013
Hi,
I have the same problem : I put searchoptions in colmodel and searchOperators:true in filterToolbar but there is no icon operator that appears on the left side of the search textbox.
Below, css and js files that I use :
<link rel="stylesheet" type="text/css" media="screen" href="css/jquery-ui-1.8.24.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/ui.multiselect.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/jquery.searchFilter.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/style.css"/>
<script src="js/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="js/jquery-ui.js" type="text/javascript"></script>
<script src="js/ui.multiselect.js" type="text/javascript"></script>
<script src="js/i18n/grid.locale-fr.js" type="text/javascript"></script>
<script src="js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="js/jquery.searchFilter.js" type="text/javascript"></script>
Here is my code:
<div id="div_data" align="center">
<table id="tab"></table>
<div id="pager"></div>
</div>
<script>
var aWidth = document.getElementById("div_data").offsetWidth -20;
jQuery("#tab").jqGrid({
url:'log-data.php',
datatype: "json",
mtype: "POST",
height: '100%',
rowNum: 20,
rowList:[20,50,100,200,400,800,1500],
gridview: true,
width: aWidth,
toppager: true,
pager: '#pager',
viewrecords: true,
sortname: "Id",
sortorder: "desc",
sortable: true,
colNames:['ID', 'Date Heure', 'Utilisateur connecté', 'Login cible', 'Texte', 'Nécess. Transf.'],
colModel:[
{name:'Id', index:'Id', hidden:true},
{name:'Time', index:'Time', align:"center", width:"80"},
{name:'User', index:'User', align:"center", width:"100"},
{name:'Dest', index:'Dest', align:"center", width:"100", search:true, searchoptions:{sopt:['eq','bw','bn','cn','nc','ew','en']}},
{name:'Comment',index:'Comment',align:"left", width:"200"},
{name:'Flag', index:'Flag', align:"center", width:"60"}
]
});
jQuery("#tab").jqGrid('navGrid','#pager',{add:false,edit:false,del:false,search:false,refresh:false});
jQuery("#tab").jqGrid('navButtonAdd','#pager',{
caption: "Colonnes",
title: "Réorganiser les colonnes",
onClickButton : function (){
jQuery("#tab").jqGrid('columnChooser');
}
});
jQuery("#tab").jqGrid('filterToolbar', {stringResult:true, searchOnEnter:false, searchOperators:true, defaultSearch : "cn"});
$(".ui-jqgrid-sortable").css('white-space', 'normal');
$(".ui-jqgrid-sortable").css('height', 'auto');
$(".ui-jqgrid tr.jqgrow td").css('white-space', 'normal');
$(".ui-jqgrid tr.jqgrow td").css('height', 'auto');
</script>
Maybe i forgot a js or css file ? please help me i didn't find anything... :'(
16:56
Moderators
30/10/2007
Hello,
Thanks. Will chek your code.
Can you pleaase check if you have the latest css and JS files. Note that the language file should be replaced too.
Regards
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.
12:51
Moderators
30/10/2007
Hello,
Glad to hear this. Thank you.
Regards
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:
48 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