Hello,
I have a radGrid that populates with groups. The group header displays the group header title and aggregate sum as expected but the group header text is not aligned under the column name. All the header text is aligned in the left side of the groupheader. My code for calculates the sum is this:
I need to align the sum under the column name inside the groupheader text.
Thank you
I have a radGrid that populates with groups. The group header displays the group header title and aggregate sum as expected but the group header text is not aligned under the column name. All the header text is aligned in the left side of the groupheader. My code for calculates the sum is this:
protected
void
RadGrid1_PreRender(
object
sender, EventArgs e)
{
RadGrid1.HeaderStyle.Font.Size = 10;
RadGrid1.GroupHeaderItemStyle.Font.Size = 10;
GridGroupByExpression gridGroupByExpression1 =
new
GridGroupByExpression();
GridGroupByField gridGroupByField1 =
new
GridGroupByField();
gridGroupByField1.FieldName =
"GroupName"
;
gridGroupByField1.HeaderValueSeparator =
" "
;
gridGroupByExpression1.SelectFields.Add(gridGroupByField1);
gridGroupByExpression1.GroupByFields.Add(gridGroupByField1);
GridGroupByField gridGroupByField3 =
new
GridGroupByField();
foreach
(totals tot
in
totalsList)
{
gridGroupByField3 =
new
GridGroupByField();
gridGroupByField3.FieldName = tot.name;
gridGroupByField3.HeaderText =
" "
;
gridGroupByField3.HeaderValueSeparator =
" "
;
gridGroupByField3.FormatString =
" (Total: {0})"
;
gridGroupByField3.Aggregate = GridAggregateFunction.Sum;
gridGroupByExpression1.SelectFields.Add(gridGroupByField3);
}
RadGrid1.MasterTableView.GroupByExpressions.Add(gridGroupByExpression1);
}
I need to align the sum under the column name inside the groupheader text.
Thank you