Change no. of digits after decimal in PivotGrid dynamically

2 posts, 0 answers
  1. Rohit
    Rohit avatar
    20 posts
    Member since:
    Dec 2017

    Posted 03 Mar 2018 Link to this post

    Hi

    How can I increase/decrease the number of digits after decimal in the pivotgrid for all cells on button click.

  2. Hristo
    Admin
    Hristo avatar
    1522 posts

    Posted 05 Mar 2018 Link to this post

    Hello Rohit,

    All you need to do is access the aggregate you want to customize and change its StringFormat property:
    private void button1_Click(object sender, EventArgs e)
    {
        PropertyAggregateDescription aggregate = this.provider.AggregateDescriptions[0] as PropertyAggregateDescription;
        aggregate.StringFormat = "0.0";
    }

    I hope this helps.

    Regards,
    Hristo
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top