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

[Solved] filterExpr Filtering for Null values client side

0 Answers 18 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.
j
Top achievements
Rank 1
j asked on 23 Nov 2011, 07:30 PM
Hi, I have implemented the client side filtering boxes.  I want to filter for blanks or null.  I have added some code the the filtering JS in the view to attempt to set the filter when the user types "null" into the filter box.  What is the filterExpr for finding rows with null in them?

Here is my code: 

  		if (column.type == "String") {
                        if (value == "null") {
                            filterExpr = column.member + " IS Null"
                        } else {
                            filterExpr = column.member + "~substringof~'" + value + "'";
                        }
                    } else {
                        filterExpr = column.member + "~eq~" + value;
                    }

Tags
Grid
Asked by
j
Top achievements
Rank 1
Share this question
or