I'm creating my grid programmatically at OnInit event, I was setting the export options for Excel, CSV and PDF.
This is my code for CSV export:
If I set the ColumnDelimiter to Tab, the result file will be a Excel File (.xls), but if I comment that line, the result file the expected .csv
Best Regards,
Sebastián Reale
This is my code for CSV export:
protected void ibtExportCSV_Click(object sender, ImageClickEventArgs e) |
{ |
RadGrid grid = (RadGrid)Place_Grilla.FindControl("Grilla"); |
grid.Columns[0].Display = false; |
grid.Columns[1].Display = false; |
//grid.ExportSettings.Csv.ColumnDelimiter = GridCsvDelimiter.Tab; |
grid.ExportSettings.Csv.RowDelimiter = GridCsvDelimiter.NewLine; |
grid.ExportSettings.IgnorePaging = true; |
grid.ExportSettings.ExportOnlyData = true; |
grid.ExportSettings.OpenInNewWindow = true; |
grid.MasterTableView.ExportToCSV(); |
} |
Best Regards,
Sebastián Reale