Is there a way to convert the CSV file returned by ExportToCSV to ANSI-based csv file instead of a UTF8-based csv file?
I tried wiring to the Grid Exporting event but thats not working because the encoding is hardwired to the response.binarywrite call which is called after the GridExporting event. Any ideas?
It would be awesome if telerik allows customization for the export encoding to ASCII, ANSI, or UTF8. Maybe a property to set the encoding.
I tried wiring to the Grid Exporting event but thats not working because the encoding is hardwired to the response.binarywrite call which is called after the GridExporting event. Any ideas?
It would be awesome if telerik allows customization for the export encoding to ASCII, ANSI, or UTF8. Maybe a property to set the encoding.
protected
void
grdTransaction_GridExporting(
object
sender, GridExportingArgs e)
{
byte
[] byteArray = Encoding.UTF8.GetBytes( e.ExportOutput);
byte
[] asciiArray = Encoding.Convert(Encoding.UTF8, Encoding.Default, byteArray);
e.ExportOutput = Encoding.ASCII.GetString(asciiArray);
}