jqGrid Filter Toolbar initial default value

Posted by Paul Creasey on Stack Overflow See other posts from Stack Overflow or by Paul Creasey
Published on 2010-03-13T23:10:12Z Indexed on 2010/03/13 23:15 UTC
Read the original article Hit count: 1360

Filed under:
|
|
|

I'm using jqGrid with the filter toolbar, i need to set an initial default filter value to one of the fields so that only rows with status 'Open' are displayed by default, but the user can display Closed rows if desired.

At the moment i have a workaround like this

setTimeout(function() {$('#gs_Status').val('Open');$("#eventsGrid")[0].triggerToolbar()},500);

but it results in a second request and is pretty bad really.

Does anybody know how to do this?

© Stack Overflow or respective owner

Related posts about jqgrid

Related posts about jQuery