1

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

Community
  • 1
  • 1
Andrus
  • 26,339
  • 60
  • 204
  • 378
  • You're going to need to provide your server side code as well. – Erik Funkenbusch Mar 06 '12 at 22:44
  • I'm currently using Oleg sample code in server from other answer. This code silently fails (generates invalid where clause) if filter contains multiple grouping. I asked for sample code which works with multiple grouping also generating propert where clause like `WHERE f1=v1 and (f2=v2 or f3=v3)` . Currently it generates only f1=v1 and silently skips `(f2=v2 or f3=v3)` clause – Andrus Mar 07 '12 at 08:59
  • I have no idea what an "Oleg sample code" is. You need to provide enough context, just your where clause is not enough. Edit your answer and don't include this information in a comment. – Erik Funkenbusch Mar 07 '12 at 15:53
  • I edited question and included link to answer containing downloadable project which fails building multiple grouping WHERE clause – Andrus Mar 07 '12 at 19:07

1 Answers1

1

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).

tpeczek
  • 23,867
  • 3
  • 74
  • 77
  • This project does not contain sql WHERE clause builder. Where to find code which builds where clause from search criteria created using multipleGroup: true ? I'm currently using Oleg jqGrid Filter class sample but it silently fails if multipleGroup: true is used – Andrus Mar 11 '12 at 17:14
  • All the links to the "JqGridRequestModelBinder" and "here" are broken. Please update the answer with the correct links. – Michael Mar 09 '14 at 17:19
  • @Michael Links have changed in the past two years, I've updated them to new ones. Thank you for swift down vote... – tpeczek Mar 09 '14 at 20:04