RadzenDataFilter.ToFilterString() returns invalid filter for string does not contain. #1569

Closed
opened 2026-01-29 17:55:33 +00:00 by claunia · 0 comments
Owner

Originally created by @osre77 on GitHub (Jan 12, 2025).

Describe the bug
The RadzenDataFilter.ToFilterString() extension method returns invalid filter for string does not contain operator.

To Reproduce
Steps to reproduce the behavior:

  1. Use RadzenDataFilter
  2. Add a property of type string
  3. Select thedoes not contain operator
  4. Enter any value
  5. Call RadzenDataFilter.ToFilterString()
  6. An invalid filter like (String(it["s:Application"]) == null ? "" : !String(it["s:Application"])).ToLower().Contains("App1".ToLower()) is returned.
    The ! is in front of the String cast operator instead of in front of the Contains method (which would be the start of the string).

Expected behavior
A valid filter like
!(String(it["s:Application"]) == null ? "" : String(it["s:Application"])).ToLower().Contains("App1".ToLower())
is returned.

Desktop (please complete the following information):

  • OS: Windows 11
  • Maui Blazor Hybrid .net9
  • Radzen 5.7.4
Originally created by @osre77 on GitHub (Jan 12, 2025). **Describe the bug** The `RadzenDataFilter.ToFilterString()` extension method returns invalid filter for string `does not contain` operator. **To Reproduce** Steps to reproduce the behavior: 1. Use RadzenDataFilter 2. Add a property of type string 3. Select the`does not contain` operator 4. Enter any value 5. Call `RadzenDataFilter.ToFilterString()` 6. An invalid filter like `(String(it["s:Application"]) == null ? "" : !String(it["s:Application"])).ToLower().Contains("App1".ToLower())` is returned. The `!` is in front of the `String` cast operator instead of in front of the `Contains` method (which would be the start of the string). **Expected behavior** A valid filter like `!(String(it["s:Application"]) == null ? "" : String(it["s:Application"])).ToLower().Contains("App1".ToLower())` is returned. **Desktop (please complete the following information):** - OS: Windows 11 - Maui Blazor Hybrid .net9 - Radzen 5.7.4
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1569