This is a migrated thread and some comments may be shown as answers.

[Solved] How can I filter a grid to only show records that have no data in a column?

1 Answer 77 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Matthew
Top achievements
Rank 1
Matthew asked on 19 Aug 2011, 04:20 PM
I have a grid in my app that's filterable, but for one of my columns I need a way for the user to tell the grid to only filter by records that have nothing in that column.  I can't seem to find a way to do this, as the filters seem to be based on data that is in the field, but nothing relating to when no data is in the field.

Thanks,

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 22 Aug 2011, 10:26 AM
Hello Matthew,

 Currently the grid filtering UI does not support empty value filtering (or null filtering). You can use the server side api to filter the grid

.Filterable(filtering => filtering
            .Filters(filters => filters
                .Add(o => o.Customer.ContactName).IsEqualTo("")
        ))

or bind the grid to a prefiltered datasource.

Regards,
Atanas Korchev
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Grid
Asked by
Matthew
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or