I’m having a colModel entry like this:
{name:'status', index:'status', sorttype:"text", xmlmap:"STATUS", width:"90", stype: 'select', searchoptions:{sopt: ['eq','ne'], value:':all;Hold:Hold;4-Eye-Check:4-Eye-Check;Approved:Approved;Rejected:Rejected;Closed:Closed'}},
thats working fine as long as it’s used in the FilterToolBar, but if I open the NavGridSearch Im running into troubles. The entry “all” is not working anymore. The query in the FilterToolBar seems to ignore my empty but the NavGridSearch doesn’t.
Is there any wildcard sign which could be used instead of an empty String, which delivers all entries regardless if I search for all status entries in the FilterToolBar or the NavGridSearch?
I use the newest OpenSource jQGrid Lib(4.3.2)
Thanks in advance!
I am trying to understand the use case for a criteria of ‘all’. It seems the purpose of ‘all’ is that you want the grid to ignore this search criteria and return all rows regardless of this value? If that is the case, why would the user even want to select this search criteria – they can just remove it and the same effect will be achieved. Or am I missing something?
Update
The grid uses function
createEl : function(eltype,options,vl,autowidth, ajaxso)to create the select for the search form. Unfortunately this select always adds theallcriteria to the list, even though it has a search value of""which will not match any rows. One workaround is to modify the grid to skip select options that have an empty value. Using the source filejquery.jqGrid.src.jsyou can add the following code to skip thealloption:Here it is within the context of
createEl:If you need a minified version, update the “src” version of jqGrid and then run it through the Google Closure Compiler.
I am not sure this is a general purpose change, which is why I am calling it a workaround for right now. Longer term a better solution needs to be found so jqGrid can be patched… I’ll try to find some more time later to revisit this issue.
Does that help?