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. Image for the cookie policy date

GCC DateTime filtering

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.



1 Reply

JJ Jisha Joy Syncfusion Team 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



Loader.
Live Chat Icon For mobile
Up arrow icon