Search of a "select-type" does not work

Sep 30, 2013 at 8:23 AM
Hi Tomasz,

Tried to get the (single) search working for a select-type:

[JqGridColumnSearchable(true, "Categories", "Home", SearchType = JqGridColumnSearchTypes.Select, SearchOperators = JqGridSearchOperators.Eq)]

But in the search form the selectlist is not displayed (url not called). So I tried your demo program, but even there no it fails (it even crashes typing a (random) value for a category). Any idea what might be wrong? Thanks in advance for any help.

Regards Gerard
Coordinator
Sep 30, 2013 at 8:46 AM
Hi Gerard,

Most probably it is some undocumented change in jqGrid between versions 4.4.1 and 4.5.2 (I have recently updated to the later one without retesting all the demos, just trusting the release notes). I will investigate this later today and get back to you.

Regards,
Tomasz Pęczek
Sep 30, 2013 at 9:47 AM
I am also having the same issue. Please let us know what version of jqgrid you recommend ?

Thank you,
NS
Coordinator
Sep 30, 2013 at 10:11 AM
Hi,

I will get back to you guys as soon as I will be able to investigate the issue, most probably within 10 to 12 hours.

Regards,
Tomasz Pęczek
Coordinator
Sep 30, 2013 at 11:03 PM
Hi,

The good news is that Lib.Web.Mvc is working properly.

The bad news is that I've tracked down the issue back to the jqGrid itself. I have created the pull request that should fix the issue (https://github.com/tonytomov/jqGrid/pull/523) so now it is time for wating.

Last version of jqGrid I was able to confirm working properly is v4.4.1 (if it comes to Single/Advanced searching, Toolbar searching works properly).

Regards,
Tomasz Pęczek
Coordinator
Oct 1, 2013 at 8:40 AM
There is also a possible workaround for later version of jqGrid (at least seems to be working in the test project). You should try setting ajaxSelectOptions to some default value (empty object will do) just after rendering the grid script:
<script type="text/javascript">
    $(document).ready(function () {
        @grid.GetJavaScript()
        jQuery('#products').jqGrid('setGridParam', { ajaxSelectOptions: {} });
    });
</script>
Marked as answer by TPeczek on 11/27/2013 at 2:29 AM
Oct 1, 2013 at 9:35 AM
Yes, that helps, thanks a lot!
Gerard
Oct 9, 2013 at 1:58 PM
This sloved my issue as well.

Thank you,
NS
Coordinator
Oct 9, 2013 at 2:29 PM
Also new version of jqGrid is available (v4.5.4) which contains my pull request - so the issue is fixed.
Marked as answer by TPeczek on 11/27/2013 at 2:29 AM