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

problem with filter GridFilterBar

hi... i have a problem when i use GridFilterBar in the grid. when i want to filter column that type is datetime, it can''t filter and the current cell can''t move whenever i click to the other cell. thanks.

1 Reply

AD Administrator Syncfusion Team June 8, 2005 01:32 PM UTC

There is a problem with filtering dates in that the DataView.RowFilter property (that the GridFilterBar uses to do the filtering) requires pounds around a date, #06/08/2005#. Currently, the GridFilterBar does not take this into account. More bothersome, is that DateTime objects are stored as doubles with fully populated values done into the milliseconds. This leads to a problem when you want to check for exact matches and just specify a date without an exact time portions. The matches will not work. And this is the problem you are likely seeing. To work around it, you can derive the GridFilterBar class and add code to manage the #-requirements and check for a day range when you look for an exact date. Here is a minimal sample. http://www.syncfusion.com/Support/user/uploads/GDBG_FilterBar_Dates_8e75818.zip It has the custom filter option removed and only lets you pull up exact date matches. If you want to add the custom back in, you can uncomment teh commented code that does this. But then you would either have to train your user to enter value date match expressions using #, or you woul dhave to display a custom dialog that adds the #''s into teh user''s expression to make it a value date check.

Live Chat Icon For mobile
Up arrow icon