RadzenDataGrid IsNull to check for empty strings as well. #456

Closed
opened 2026-01-29 17:37:37 +00:00 by claunia · 3 comments
Owner

Originally created by @130nk3r5 on GitHub (Jul 6, 2022).

Currently the RadzenDataGrid's Is Null filter does not support string.Empty values.

Would it be possible to update the QueryableExtension on line 407 - 414 to be as follow:
else if (columnFilterOperator == FilterOperator.IsNull) { return $@"np({property}) == null || np({property}) == ''"; } else if (columnFilterOperator == FilterOperator.IsNotNull) { return $@"np({property}) != null || {property} != ''"; }

Originally created by @130nk3r5 on GitHub (Jul 6, 2022). Currently the RadzenDataGrid's _Is Null_ filter does not support string.Empty values. Would it be possible to update the `QueryableExtension` on line 407 - 414 to be as follow: ` else if (columnFilterOperator == FilterOperator.IsNull) { return $@"np({property}) == null || np({property}) == ''"; } else if (columnFilterOperator == FilterOperator.IsNotNull) { return $@"np({property}) != null || {property} != ''"; } `
Author
Owner

@enchev commented on GitHub (Jul 6, 2022):

Hey @130nk3r5,

Empty strings are not null, maybe we can add IsEmpty/IsNotEmpty for string columns.

@enchev commented on GitHub (Jul 6, 2022): Hey @130nk3r5, Empty strings are not null, maybe we can add IsEmpty/IsNotEmpty for string columns.
Author
Owner

@130nk3r5 commented on GitHub (Jul 7, 2022):

I like the idea. Will respond on the forum.

@130nk3r5 commented on GitHub (Jul 7, 2022): I like the idea. Will respond on the forum.
Author
Owner

@enchev commented on GitHub (Jul 7, 2022):

Implemented in https://github.com/radzenhq/radzen-blazor/pull/514

@enchev commented on GitHub (Jul 7, 2022): Implemented in https://github.com/radzenhq/radzen-blazor/pull/514
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#456