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

Grid Grouping Caption Text

Thread ID:





48624 Aug 31,2006 12:58 PM UTC Sep 1,2006 04:50 PM UTC WinForms 2
Tags: Grouping
Ajay Bhalegar
Asked On August 31, 2006 12:58 PM UTC


I am using a GGC, in it i am grouping by a date.When i am grouping by date i want to show the display date in different format

i have added below code

gridColumnDescriptor = grdMeetInvHistory.TableDescriptor.Columns.FindByMappingName(CalendarModelUpdater.MeetingResultDateColumnName);

grdMeetInvHistory.ChildGroupOptions.CaptionText = "{Category}";
gridColumnDescriptor.Appearance.GroupCaptionCell.Format = "dddd dd MMMM yyyy";

but it is not working
is there any way to show the date in different format

Thanks & Regards

Administrator [Syncfusion]
Replied On September 1, 2006 06:58 AM UTC

Hi Ajay,

You can handle the QueryCellStyleInfo event to solve this. See the below code snippet for more details.

//form load event.
this.gridGroupingControl1.TableDescriptor.GroupedColumns.Add("MeetingResultDateColumnName" ,ListSortDirection.Ascending);
this.gridGroupingControl1.TableDescriptor.Columns["MeetingResultDateColumnName"].GroupByOptions.CaptionText = "{Category}";

GridCaptionRow gcr = e.TableCellIdentity.DisplayElement as GridCaptionRow;
//get value of first group

if(gcr.ParentGroup !=null && gcr.ParentGroup.Category !=null && gcr.ParentGroup.Name == "MeetingResultDateColumnName")
e.Style.CellValueType = typeof(System.DateTime);
e.Style.Format = "dddd dd MMMM yyyy";
e.Style.Text = string.Format( "{0}",e.Style.CellValue) ;


Ajay Bhalegar
Replied On September 1, 2006 04:50 PM UTC

Hi Hanif,

Thanks a lot, the code given by you is working fine.

Thanks & Regards


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