
Matt DiPietro
Top achievements
Rank 1
Matt DiPietro
asked on 30 Sep 2011, 09:12 PM
The documentation for the grid filtering mechanism indicates that the IsEmpty filter option will return results where ColumnName = '', but I can't seem to get this to work. Every time I select IsEmpty, it returns an empty grid. All other filter options work but this one. I'm populating the grid using NeedDataSource by populating a data table with the results from a SQL data table and setting the grid data source to the table. Am I missing something or do I need to reconsider my approach to populating the data to get this filter to work? It's critical to my clients to able to utilize this feature as a large portion of their use of the grid is to identify incomplete data records.
5 Answers, 1 is accepted
0

Princy
Top achievements
Rank 2
answered on 03 Oct 2011, 10:51 AM
Hello Matt Dipietro,
IsEmpty filter expression is used to filter the column which contains blank value. Here is the screenshot which worked as expected.
Thanks,
Princy.
IsEmpty filter expression is used to filter the column which contains blank value. Here is the screenshot which worked as expected.
Thanks,
Princy.
0

Matt DiPietro
Top achievements
Rank 1
answered on 03 Oct 2011, 01:38 PM
Thanks for the reply. I understand what it's used for, I don't understand why it doesn't work. In the grids I have created, if I were to selected IsEmpty on the name column, it would have returned No Records. That is what I'm trying to figure out.
0

Princy
Top achievements
Rank 2
answered on 04 Oct 2011, 05:39 AM
Hello Matt Dipietro,
Make sure that the filtered column contains some empty value. Then only it will show results.
Thanks,
Princy.
Make sure that the filtered column contains some empty value. Then only it will show results.
Thanks,
Princy.
0

Matt DiPietro
Top achievements
Rank 1
answered on 04 Oct 2011, 01:22 PM
I was, it didn't matter what I did, it always returned no records even if there were rows that met the IsEmpty criteria. I got this to work--I ended up having to set EnableLinqExpressions = "false". I do have another question though that maybe you can help with.
Is there a way to always force the user to have to select a filter option from the menu? It seems that the grid always defaults to EqualTo for numeric columns and it's forcing my users to have to make multiple clicks to be able to use the GreaterThan option. If the user selects GreaterThan from the menu, then types in a value, and clicks the Filter button the page postsback, but the filter option has changed to EqualTo. They then have to reopen the filter menu and click GreaterThan again to see the correct results. If the user just types in a value and then clicks to expand the menu, it automatically postsback without displaying the menu, again defaulting to the EqualTo option.
Ideally we would operate using the second scenario, but instead of automatically causing the postback, we would force the user to select the filter option. Is there a way to do so?
Is there a way to always force the user to have to select a filter option from the menu? It seems that the grid always defaults to EqualTo for numeric columns and it's forcing my users to have to make multiple clicks to be able to use the GreaterThan option. If the user selects GreaterThan from the menu, then types in a value, and clicks the Filter button the page postsback, but the filter option has changed to EqualTo. They then have to reopen the filter menu and click GreaterThan again to see the correct results. If the user just types in a value and then clicks to expand the menu, it automatically postsback without displaying the menu, again defaulting to the EqualTo option.
Ideally we would operate using the second scenario, but instead of automatically causing the postback, we would force the user to select the filter option. Is there a way to do so?
0

Matt DiPietro
Top achievements
Rank 1
answered on 04 Oct 2011, 01:48 PM
I see that this is happening because AutoPostBackOnFilter is true. I'm using AutoGeneratedColumns, so where can I set this to false? I tried doing so in the ColumnCreated event, but it doesn't appear to have done anything--the behavior is still the same.