Completed
Last Updated: 23 Mar 2015 09:42 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 21 Feb 2014 09:56
Category: PivotGrid
Type: Bug Report
1
FIX. RadPivotGrid - Exporting to Excel of a string field with numeric value is exported as number
If you have an object with string property and for all the available objects in the RadPivotgrid you have numeric values for this property with leading zero digits (e.g. "002"), it is exported in Excel as a numeric cell.
1 comment
ADMIN
Ralitsa
Posted on: 23 Mar 2015 09:42
If you use Q1 2015 SP1 or higher version of Telerik UI for Winforms, you need to subscribe to the PivotExcelCellFormatting event and change the DataType from Number to String. Here is the code snippet: 
private void exporter_PivotExcelCellFormatting(object sender, ExcelPivotCellExportingEventArgs e)
{
    if (e.ColumnIndex == 0 && e.DataType == "Number")
    {
        e.DataType = "String";
    }
}