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.
Syncfusion Feedback

GCC DateTime filtering

Thread ID:

Created:

Updated:

Platform:

Replies:

79565 Feb 16,2009 01:42 AM UTC Feb 16,2009 11:58 AM UTC Windows Forms 1
loading
Tags: GridControl
Alex Loh
Asked On February 16, 2009 01:42 AM UTC

Hi,

1) Is it possible to prevent the time from being displayed in GGC's filter combo. (displays only the date - column type is DateTime)?

2) How do I display a Null/DateTime.MinValue in the GGC to display as empty cell?

Thanks in advance.



Jisha Joy [Syncfusion]
Replied On February 16, 2009 11:58 AM UTC

Hi Alex,

We appreciate your interest in Syncfusion Products.

Qn 1:

You can do this by deriving the GridTableFilterBarCellModel class and override FillWithChoices which is the method that fills the dropdown. Please refer the forum thread below for more information on this.

http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=25998

Also, check this KB article below
How do I customize the filterbar dropdown?


Qn 2:

Please try to handle QueryCellFormattedText and check for the e.Value. Please refer the code:



void gridGroupingControl1_QueryCellFormattedText(object sender, Syncfusion.Windows.Forms.Grid.GridCellTextEventArgs e)
{
GridTableCellStyleInfo style = (GridTableCellStyleInfo)e.Style;
if (style.TableCellIdentity.ColIndex ==2 && style.TableCellIdentity.RowIndex>3 )//(style.TableCellIdentity.Column != null && style.TableCellIdentity.Column.Name == "Date")
{
if (e.Value == DateTime.MinValue.ToString())
{
e.Text = "";
e.Handled = true;
}
}
}

Please let me know if this.

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.

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

;