how to create sql WHERE clause from jqgrid multipl

2019-08-13 16:42发布

jqGrid multiple group search is used which produces grouped filters object. ASP .NET MVC2 is used in server side to create where clause string which is passed to PostgreSql.

Oleg ASP.NET MVC jqGrid sample sql where clause builder builds invalid where clause for this condition. It works only without gruping.

Whre to find sample C# code which generates corrent where clause if multipleGroup: true is used ?

$.extend($.jgrid.search, {
    savekey: [true, 13],
    multipleSearch: true,
    multipleGroup: true,
    recreateForm: true,
    overlay: 0,
    closeOnEscape: true,
    closeAfterSearch: true
 });

Edit

Here is link to WHERE clause builder ASP.NET MVC 2.0 Implementation of searching in jqgrid

1条回答
家丑人穷心不美
2楼-- · 2019-08-13 17:07

Please take a look at JqGridRequestModelBinder class which is ASP.NET MVC model binder for jqGrid request, it should give you an idea how to deserialize the multipleSearch/multipleGroup filters. You can find here all the other necessary classes. This is all part of Lib.Web.Mvc project. You can find samples on how to use this library here (go the zip file or get the latest version from Subversion).

查看更多
登录 后发表回答