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

Date Formatting in Filters of filterbar

Thread ID:

Created:

Updated:

Platform:

Replies:

19818 Oct 5,2004 04:38 AM UTC Oct 5,2004 06:03 AM UTC WinForms 2
loading
Tags: GridControl
Tom
Asked On October 5, 2004 04:38 AM UTC

Hi, I''m using the GridDataBoundGrid. And I was wondering if you can format the date in the filterbar? (ex. ddd dd/MM/yyyy) And how? Thanks a lot, Tom

Administrator [Syncfusion]
Replied On October 5, 2004 05:58 AM UTC

We will try to make this easier, but for now I think you would have to loop through the entries in the drop list and explicitly format them. Below is a code snippet for the BirthDate column in the Employees table of the FilterBar sample.
theFilterBar.WireGrid(this.gridDataBoundGrid1);
//change the dateformats
int col = this.gridDataBoundGrid1.Binder.NameToColIndex("BirthDate");
if(col > -1)
{
	DataTable dt = (DataTable) this.gridDataBoundGrid1[1, col].DataSource;
	for(int i = 2; i < dt.Rows.Count; ++i)
		dt.Rows[i][0] = DateTime.Parse((string) dt.Rows[i][0]).ToString("ddd dd/MM/yyyy");
}

Tom
Replied On October 5, 2004 06:03 AM UTC

Thank you very much! I really appreciate your help.

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

;