Hi Vasili,
Thank you for your interest in Syncfuion Products.
Using queryCellStyleInfo event, we can format the reported GroupedHeaderCaption issue.
Please refer the following code snippet,
void GridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Web.UI.WebControls.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{
// if the Celltype is RecordFieldCell or AlternateRecordFieldCell then format the record rows
if (e.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell || e.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell)
{
if (e.TableCellIdentity.Column.Name == "Duration")
{
//Format the Column Duration using formula
e.Style.CellValue = ((Convert.ToInt32(e.Style.CellValue) / (60 * 60))) + "h**" + ((Convert.ToInt32(e.Style.CellValue) / 60) % 60) + "m **" + (Convert.ToInt32(e.Style.CellValue) / (3600 * 60)) + "s";
e.Handled = true;
}
}
else if (e.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionCell)
{
// if Column is grouped then split the GroupCaptionCell
if (this.GridGroupingControl1.TableDescriptor.IsGrouped)
{
string[] groupedCellValues = e.Style.CellValue.ToString().Split('-', ':');
if (groupedCellValues[0].IndexOf("Duration") != -1)
{
//Format the Column Duration using formula
string s1 = (Convert.ToInt32(groupedCellValues[1]) / 3600) + "h **" + ((Convert.ToInt32(groupedCellValues[1]) / 60) % 60) + "m **" + ((Convert.ToInt32(groupedCellValues[1]) / (3600 * 60))) + " s";
e.Style.CellValue = groupedCellValues[0]+ ": " + s1 + "-" +groupedCellValues[2];
}
}
}
}
Please refer the sample from below link.
http://files.syncfusion.com/support/GGC.Web/7.2.0.37/84816/main.htmThe above sample illustrates, the Column "Duration" & GroupCaptionCell are formatted (Custom) using formula in QueryCellInfo event.
Please let me know if this helps you out.
Regards,
M. Balaji