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.
Unfortunately, activation email could not send to your email. Please try again.

Date Formatting in Filters of filterbar

Thread ID:





19818 Oct 5,2004 12:38 AM Oct 5,2004 02:03 AM Windows Forms 2
Tags: GridControl
Asked On October 5, 2004 12:38 AM

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 01:58 AM

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.
//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");

Replied On October 5, 2004 02:03 AM

Thank you very much! I really appreciate your help.


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.

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.