Cannot create functional custom FilterDescriptor in MVC grid

I am creating a Grid in an MVC project (Razor). I attempt to create a custom filterdescriptor to have a default filter, as part of the grid definition, like
 
      .Filtering(filter =>
      {
          filter.AllowFiltering(true);
          filter.FilterMode(FilterMode.FilterBar);
          filter.FilterBarMode(FilterBarMode.OnEnter);
 
          filter.FilterDescriptors(descriptor =>
          {
              descriptor.Add(new FilterDescriptor("Group") { ColumnName = "Group"IsCaseSensitive = falseOperator = Syncfusion.Linq.FilterType.StartsWithPredicate = PredicateType.AndValue = "C" });
          });
      })
note the fluent .Add call ends up with the same result
               descriptor.Add(d => d.Group).MatchCase(false).FilterBy(Syncfusion.Linq.FilterType.Contains).Predicate(PredicateType.And).FilterValue("C");

When I attempt to page (or POST any grid operations), I get a 500 in response from .GridActions<>. When looking at the PagingParams passed to the action method, the FilterDescriptor corresponding to the one defined in the code above has a null ColumnName. args.FilterObject ==

"[{\"Column\":\"Group\",\"Operator\":6,\"Predicate\":0,\"Value\":\"C\",\"IsCaseSensitive\":false}]"

If, however, I do not create the descriptor in the definition, and through the FilterBar filter the Group field to C (so, do what results in exactly the same records), when POSTing, the FilterDescriptor corresponding to Group has a ColumnName = "Group" and arg.FilterObject == 

"[{\"ColumnName\":\"Group\",\"Operator\":\"6\",\"Value\":\"C\",\"Predicate\":\"0\",\"IsCaseSensitive\":false}]"

Note the FilterObject property is the same except the FilterBar FilterDescriptor version has "ColumnName" instead of "Column".

So, either I am doing something wrong or there is a bug in the FilterDescriptor.Add tree.

Suggestions on what to do to either (a) be correct or (b) work around?

thanks
 

2 Replies

SB Scott Belina January 21, 2013 08:09 PM UTC

I am using version 10.434.0.71 of the Syncfusion.Grid.MVC and Syncfusion.Shared.MVC , BTW, and 10.404.0.71 of Syncfusion.Core.


RD Rakesh D Syncfusion Team January 24, 2013 03:46 PM UTC

Hi Scott Belina,

 

Thanks for using Syncfusion products.

 

We regret to let you know that we can provide solution for this only through Direct-Trac incident, so could you please create the incident in your direct trac account.

You can login to your Direct-Trac account using the credentials and password that are provided by our sales team to create incident. I would request you to use the following link to login to your DT account.

 

http://www.syncfusion.com/account/Logon

 

Please let us know if you need further assistance. We would be happy to assist you.

 

Regards,

Rakesh D

 


Loader.
Up arrow icon