We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

GGC (Expression Filter and comparison to NULL)

Hello Syncfusion team!

I have a question to Expression Filters in a GridGroupingControl.

I want to filter records if they are Empty (DBNull) not with Conditions like "Equals (null)" but with the Expression Filter.

I try expressions like "[BookingDate] equals (null)" or "[BookingDate] equals '(null)'" etc. with no effect, any ideas?

Best regards
Alexander




1 Reply

VK Vinoth Kumar K Syncfusion Team January 23, 2008 06:47 PM UTC

Hi Alexander,

Thanks for using Syncfusion products.

You can filter records if they are Empty/Null by using the code snippet given below.


RecordFilterDescriptor recFilter = new Syncfusion.Grouping.RecordFilterDescriptor();
recFilter.Name = "someName";
recFilter.Expression = "[col1] = ' '"; // this is two single quotes followed by the closing double quote to indicate an empty/Null string in the column whose mapping name is colName.
this.gridGroupingControl1.TableDescriptor.RecordFilters.Add(recFilter);


Please refer to the sample given below which illustrates the above:
http://websamples.syncfusion.com/samples/Grid.Windows/F71070main.htm

Please let me know if you have any questions.

Regards,
Vinoth



Loader.
Live Chat Icon For mobile
Up arrow icon