As a workaround, you can use the following approach. After the export read the exported CSV file, remove the last lew line, and save it back to the file system.
private void radButton1_Click(object sender, EventArgs e)
{
ExportToCSV exporter = new ExportToCSV(this.radGridView1);
exporter.RunExport(@"C:\Temp\Temp.csv");
// Open the CSV text file and remove the new line.
string text = File.ReadAllText(@"C:\Temp\Temp.csv");
// Text ends with Environment.NewLine, so we need to trim it.
text = text.Substring(0, text.Length - Environment.NewLine.Length);
File.WriteAllText(@"C:\Temp\Temp.csv", text);
}
Regards,
Todor Vyagov
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.