Login

  • Sign in with Intersoft Social ID
  • Sign in with Intersoft ID (Developer Network)
  • Sign in with Google ID
  • Sign in with Open ID. Click for more options.
Intersoft Social ID
Password
Intersoft Latest Learn More

Latest Development Blogs

Blog RSS
Loading
Retrieving News

Forum                   Topics  Post

Incorrect Filter Types when a WebGridColumn uses EditType of WebCombo and FitlerType of TextBox

3 replies. Last post: August 1, 2012 8:22 PM by Bernard
Rate this topic:
Average rating: Not rated yet.
Tags :
  • (None)
Scott FrenchMember
We've run into this situation in the past but always worked around it. Now we're getting to the point that we'd like to find a long term solution. The problem is this: We have many columns that use a WebCombo as the EditType. The default WebGrid behavior is to also use the WebCombo for the FilterType. We would like to use a TextBox as the FilterType as it is quicker and allows for more than one result to be returned as part of that single filter. All of our WebCombo columns use WebValueLists as the actual value is an ID. We can get around this by using the FilterKeyField setting and pointing to a hidden field (for example instead of filtering by SupplierID we filter By SupplierName using FilterKeyField).

All of this works, the only problem is the context menu for the Filter Type is incorrect. We would expect to see a list that contains:

"Not Set, Equals To, Does Not Equal To, Like, Does Not Like, Contains, Does Not contain, Is Null, Is Not Null, Is Empty, Is Not Empty"

but instead we get a list that contains:

"Not Set, Greater Than or Equals To, Greater Than, Equals To, Does not Equal To, Less Than or Equals To, Less Than, Is Between, Is Not Between, Is Null, Is Not Null".

It looks like the problem is the set of Filter Types is the grouping that would go along with integers or dates. By supplying an alternate FilterKeyField and specifying TextBox as the FilterEditType we would expect the proper list of filter types to be displayed.

We've tried adding/removing the filter types using the instructions here (http://www.intersoftpt.com/Community/WebGrid/How-can-I-remove-grid-filter-options-like-Is-Not-Empty-or-Is-Null-etc/) and in the Support Docs but we consistently get this JavaScript error: "Unable to get value of the property 'SetChecked': object is null or undefined". This error occurs in the compiled/obfuscated Intersoft JavaScript so debugging is not possible.

I've attached a sample page that highlights the Filter Type context menu issue. We've modified the SupplierID column to filter by ProductName and use TextBox as the filter type. A few of the options actually do work but the filter type menu is missing the "Like" and "Contains" options. Compare that to the ProductName filter menu which has the correct list of filter type options.

FYI: We are using WebGrid 7.0.7200.401 and the issue has occurred in all browsers tested.

Please let me know if there are any possible fixes or work arounds as this functionality would be very useful in our app.

All times are GMT -5. The time now is 2:16 PM.