Text wrapping in pivot cells

3 posts, 1 answers
  1. Sjoerd
    Sjoerd avatar
    9 posts
    Member since:
    Oct 2011

    Posted 14 Jan 2013 Link to this post

    I am using a somewhat  special OLAP cube with a calculation that  returns textual information for pivot cells. Your pivotgrid correctly shows the text, but the text does not wrap. Only so much text is shown as fits in the column's width. Is there a setting that I missed here?

    Thanks
    Sjoerd
  2. Answer
    Peter
    Admin
    Peter avatar
    1148 posts

    Posted 16 Jan 2013 Link to this post

    Hi Sjoerd,

    Thank you for writing.

    Using the
    CellFormatting event you can set various properties of the PivotGridCellElement to modify its appearance. The following example will set the WrapText property to True:
    void radPivotGrid1_CellFormatting(object sender, PivotCellEventArgs e)
    {
        if (!e.CellElement.IsInGrandTotalColumn)
        {
            e.CellElement.WrapText = true;
        }
    }

    I hope this helps.

    Kind regards,
    Peter
    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Sjoerd
    Sjoerd avatar
    9 posts
    Member since:
    Oct 2011

    Posted 16 Jan 2013 Link to this post

    Thanks Peter,

    Works like a charm (using TextWrap instead of WrapText  :-)  )

    Sjoerd
Back to Top