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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Filterbar on date field

Thread ID:

Created:

Updated:

Platform:

Replies:

77038 Oct 9,2008 07:15 AM UTC Nov 14,2008 09:02 AM UTC WinForms 5
loading
Tags: Grouping
Christian Rattat
Asked On October 9, 2008 07:15 AM UTC

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









Jisha Joy [Syncfusion]
Replied On 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


Christian Rattat
Replied On 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




Jisha Joy [Syncfusion]
Replied On 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


Christian Rattat
Replied On 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

Jisha Joy [Syncfusion]
Replied On 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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;