Home Forums WinForms controls Xceed Grid for WinForms Fixed-aligned text on group SummaryRow Reply To: Fixed-aligned text on group SummaryRow

User (Old forums)
Member
Post count: 23064

Hi André,

(Please ignore my previous post)

This is my code:

    protected void AddGroupSummaryRow(Group group, string summaryRowTextFormat) {

        SummaryRow summaryRow = new SummaryRow();
        summaryRow.TextFormat = summaryRowTextFormat; // text: “Balance”
        summaryRow.ShowFixedColumnSplitter = ShowFixedColumnSplitter.WhenFixedColumnsExist;
        group.FooterRows.Add(summaryRow);

        // we only want to summarize numeric columns
        foreach (SummaryCell summaryCell in summaryRow.Cells) {
            if (summaryCell.ParentColumn.DataType == typeof(int)) {
                summaryCell.StatFunction = Xceed.Grid.StatFunction.Sum;
                //summaryCell.TitleFormat = summaryRowTextFormat;
                //summaryCell.TitlePosition = TitlePosition.PreferablyRight;
            }
            else {
                summaryCell.StatFunction = Xceed.Grid.StatFunction.None;
            }
        }
    }

In my grid I have three columns that contain text (“Counterpart”, “Conctract” and “Deliverypoint”. These columns are fixed (to be able to see them always as I scroll horizontally). In addition I have columns for each day of the month (on day in each column). These columns have a statistical function in their corresponding SummaryCell of the SummaryRow on a group. To display a text on the SummaryRow of the group, I have originally used SummaryRow.TextFormat. This works well for displaying the text, but when I scroll to the right, the text disappears out of view. So I was looking for a way to fix the text similar to the way we can fix a column. If I set the SummaryCell.TitleFormat (as you suggested) instead of the SummaryRow.TextFormat, the text displays correctly, but still it disappears out of view when I scroll.

I tried to set the SummaryCell.TitleFormt explicitly for the columns that only contain text (since these columns are fixed), but the text is not displayed at all.

What I am doing wrong?
Thanks in advance!

Regards,
Annette Skår

Imported from legacy forums. Posted by annetteS (had 543 views)