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
JqGrid toolbar filter does not work, but the advanced does
18/04/2014
14:30
Avatar
serhio
Member
Members
Forum Posts: 3
Member Since:
20/02/2014
sp_UserOfflineSmall Offline

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(&quot;' + ids[i] + '&quot;);return false;"><img src="/Content/images/icons/edit16.gif" title="Modifier"></a>&nbsp;';

actions += '<a href="#" onclick="onGridClickDelete(&quot;' + ids[i] + '&quot;);return false;"><img src="/Content/images/icons/cancel16.gif" title="Supprimer"></a>&nbsp;';

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".

19/04/2014
12:28
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

Forum Timezone: Europe/Sofia

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.com

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

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information