I have an ASP.NET MVC 3 page. On it, I have a table which I turn into a jqGrid using JSON data from an ajax call. The grid has the following setup:
myGrid
I find your question interesting so +1 from me to your question. Because you posted the line
(String(this.blah).substr(0,10) == String("11/17/2010"))
used in eval
during the local searching I suppose you spend much time to understand how the local searching are implemented. Because you see that the line above (see (String(this.blah).substr(0,10) ...
) is not what should be done (the value of String(this.blah)
will be "2010-11-17" instead of "11/17/2010"), you can overwrite the corresponding function of jqGrid (the function _getStr
inside of $.jgrid.from
) and fix the problem in the way.
Some time ago I spend much time to prepare the corresponding the demo, which demonstrates this technique. The demo was prepared as the answer in trirand forum. In the question one wanted to find strings like 'bénevise'
in case of searching for 'benevise'
. So one have to implement really custom local searching. I hope that the information will be enough for you to fix the problem which you describe.
UPDATED: It seems to me that I have found a much more simple workaround. You should just define searchoptions: {sopt: ['eq','ne']}
for the 'blah'
column having the data. Then "bw"
(begin with) will not used for the column. The "equal to" and "not equal to" operations work correctly in the local searching.
UPDATED 2: Here is the working example where I use sopt
option.