Forum
14:30
20/02/2014
I have a JqGrid that filters pretty good the elements wehn using advanced search, but does nothing when using the ToolbarSearch. What could be the cause?
There are some code elements:
jQuery("#grild").jqGrid({
"url": '/Devis/PagedList',
"datatype": 'json',
"mtype": 'POST',
"postData": {},
"width": 920,
"height": 300,
"colNames": colNames,
"colModel": colModel,
"pager": jQuery('#pager'),
"page" : 0,
"rowNum": 30,
"rowList": [30, 50, 100],
"sortname": 'CreationDate',
"sortorder": 'desc',
"loadComplete": function () {
var ids = jQuery("#grid").getDataIDs();
for (var i = 0; i < ids.length; i++) {
var cl = ids[i];
var eltid = jQuery("#grid").getRowData(ids[i]).Actions;
var actions;
actions = '<a href="#" onclick="onGridClickEdit("' + ids[i] + '");return false;"><img src="/Content/images/icons/edit16.gif" title="Modifier"></a> ';
actions += '<a href="#" onclick="onGridClickDelete("' + ids[i] + '");return false;"><img src="/Content/images/icons/cancel16.gif" title="Supprimer"></a> ';
jQuery("#gride").setRowData(ids[i], { "Actions": actions });
}
},
"viewrecords": true,
"imgpath": '/Content/jqueryui/images',
"caption": "Commandes",
"shrinkToFit": true,
"hidegrid": false
})
.navGrid("#pager", { "edit": false, "add": false, "del": false, "search": true });
<script type="text/javascript">
$(document).ready(function () {
$("#grid").jqGrid('filterToolbar', { stringResult: true });
$(".datepicker").datepicker({
dateFormat: 'dd/mm/yy',
showAnim: ''
});
});
</script>
I mean, the `PagedList` action is not reached when clicking on the <kbd>Enter</kbd> button after filling-in the search toolbar box, but is reached when opening the advanced search "form".
12:28
Moderators
30/10/2007
Hello,
By default search on Enter is true and for me is difficult to tell you why is this happen.
You can try to buld the toolbar search immediate after the grid is created and not in separate document ready funion.
Try to input the
$("#grid").jqGrid('filterToolbar', { stringResult: true });
immediatley after navGrid.
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:
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