Page 1 of 1

Filter string for TDateTime field - TCRDBGrid

Posted: Thu 21 Jan 2016 10:40
by ertank
Hi,

I am using MSSQL Express as a database. I have a TCRDBGrid which its columns are dynamically set during run-time. One of the columns linked to a "date" datatype field on MSSQL.

There are some records with "date" field set to NULL in the MSSQL database. I want my users to be able to filter NULL records (or empty records) for a "date" field using provided CRDBGrid filter property at run-time. Is this possible? If yes, what should filter string look like?

Re: Filter string for TDateTime field - TCRDBGrid

Posted: Thu 21 Jan 2016 11:51
by AlexP
Hello,

In order to filter by empty (NULL) fields, you should add the NULL word in the filter field.

Re: Filter string for TDateTime field - TCRDBGrid

Posted: Thu 21 Jan 2016 14:55
by ertank
My bad. Both upper case and lower case NULL is working. I hit another bug explained here.

http://forums.devart.com/viewtopic.php?f=28&t=33025

That's why my trials were producing error messages. Modified column names and all good now.

Thanks.

Re: Filter string for TDateTime field - TCRDBGrid

Posted: Tue 26 Jan 2016 08:28
by AlexP
Glad to see that you solved the problem. If you have any other questions, feel free to contact us