Completed
Last Updated: 27 Aug 2015 09:47 by ADMIN
ADMIN
Dimitar
Created on: 16 Apr 2015 08:42
Category: GridView
Type: Bug Report
0
FIX. RadGridView - SpreadExport - incorrect format with culture where the decimal separator is ','
To reproduce:
- Populate the grid with some double values.
- Change the culture to Dutch(Belgian)
- Export the grid

Workaround:

void spreadExporter_CellFormatting(object sender, Telerik.WinControls.UI.Export.SpreadExport.CellFormattingEventArgs e)
{
    if (e.GridColumnIndex == 0 && e.GridCellInfo.Value != string.Empty)
    {
        CellValueFormat cvf = new CellValueFormat("0,00");
        e.CellSelection.SetFormat(cvf);
        e.CellSelection.SetValue(((double)e.GridCellInfo.Value));
    }
}
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments