Filterbar on date field

Hi,

I'm using SF Suite 4.202.0.37 and have a problem with the filterbar on a date field in gridgrouping control.

The grid displays a couple rows including the date when the entries have been created. I have set the format of the date column to "d" because I just want to show the date but not the time and I don't want to use string instead of datetime type.

If I now have e.g. 2 rows with date "08.10.2008 10:00" and "08.10.2008 11:00" I get two identical entries in the filter list showing "08.10.2008". When I select one of them only one of the rows is displayed.

How can I get the filterlist showing only the date without time and no duplicates and how can I get the filter selecting rows ignoring the time part of the date?

Thanks in advance,
Christian









5 Replies

JJ Jisha Joy Syncfusion Team October 15, 2008 06:25 AM UTC

Hi Christian,

Thank you for posting query to us.


You can use the Format property for this purpose. Please refer the code:


this.gridGroupingControl1.TableDescriptor.Columns[2].Appearance.AnyCell.Format = "dd/MM/YYYY";

Please try this and let me know if this helps.

Regards,
Jisha



CR Christian Rattat October 29, 2008 08:23 AM UTC

Hi Jisha,

I have used

this.gridGroupingControl1.TableDescriptor.Columns[2].Appearance.AnyCell.Format = "d"

as date format string, because I want to support regional setting correctly. This shows the date in right format but anyway I get multiple entries as described in my original post. It seems that the date is displayed correctly but internally the grid works with the complete datetime object and considers the time part which leads to doubled entries.

So again my question: How can I make the filter showing only one date entry for entries with the same date but different time?

Regards,
Christian





JJ Jisha Joy Syncfusion Team October 30, 2008 12:43 PM UTC

Hi Christian,

Please try the following code and let me know if this helps.

this.gridGroupingControl1.TableDescriptor.Columns[1].Appearance.AnyRecordFieldCell.CellType = "Static";
this.gridGroupingControl1.TableDescriptor.Columns[1].Appearance.AnyRecordFieldCell.Format = "d";
this.gridGroupingControl1.TableDescriptor.Columns[1].Appearance.FilterBarCell.Format = "d";

Regards,
Jisha



CR Christian Rattat November 11, 2008 10:08 AM UTC

Hi Jisha,

I tried this but it still shows me the same results. I have attached a screenshot of my application to see what I mean.

Any other ideas?

Regards,
Christian



grid_9755d5cf.zip


JJ Jisha Joy Syncfusion Team November 14, 2008 09:02 AM UTC

Hi Christian,

I have prepared a simple sample to test the issue. It is working fine for me. Please try to reproduce the issue in the below sample and provide us the reproducing steps.

Sample link:


http://websamples.syncfusion.com/samples/Grid.Windows/GGCWithBooleanColumn1.zip
Please let me know if you have any questions.

Regards,
Jisha


Loader.
Up arrow icon