This is a migrated thread and some comments may be shown as answers.

Change no. of digits after decimal in PivotGrid dynamically

1 Answer 12 Views
PivotGrid and PivotFieldList
This is a migrated thread and some comments may be shown as answers.
Rohit
Top achievements
Rank 1
Rohit asked on 03 Mar 2018, 02:47 PM

Hi

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

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 05 Mar 2018, 02:00 PM
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.
Tags
PivotGrid and PivotFieldList
Asked by
Rohit
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or