StringFormat Documentation

2 posts, 1 answers
  1. Jens
    Jens avatar
    19 posts
    Member since:
    Aug 2014

    Posted 14 Sep 2015 Link to this post


    is there any documentation about the "StringFormat" property used by the PropertyAggregateDescription?

    Only useful resource i found was for Kendo UI (​).

    I have no clue how to set the Format to n0 and add a postfix string (the result should look like 10,045 FOO$). I've tried "n0 'FOO$'", but it keeps ignoring the n (so i dont get any separators). "0 'FOO$'" works, but does not give me the desired number format.




  2. Answer
    Dess avatar
    1561 posts

    Posted 16 Sep 2015 Link to this post

    Hello Jens,

    Thank you for writing back.

    You can find useful information about specifying a format for numeric cells in the following help article: Standard Numeric Format Strings. In order to add a specific text next to the numeric value it is appropriate to use the CellFormatting event and set the Text property:
    private void radPivotGrid1_CellFormatting(object sender, Telerik.WinControls.UI.PivotCellEventArgs e)
        if (e.CellElement.Row.Name.Contains("Freight") && e.CellElement.Text != string.Empty)
            e.CellElement.Text = string.Format("{0:n3} FOO$", e.CellElement.Value);

    I hope this information helps. If you have any additional questions, please let me know.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top