AD
Administrator
Syncfusion Team
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}";
//QueryCellStyleInfo
if(e.TableCellIdentity.TableCellType==GridTableCellType.GroupCaptionCell)
{
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) ;
}
}
Thanks,
Haneef
AB
Ajay Bhalegar
September 1, 2006 04:50 PM UTC
Hi Hanif,
Thanks a lot, the code given by you is working fine.
Thanks & Regards
Ajay