Completed
Last Updated: 26 May 2015 14:17 by ADMIN
ADMIN
Dess | Tech Support Engineer, Sr.
Created on: 05 Jan 2015 08:24
Category: GridView
Type: Feature Request
1
IMPROVE. RadGridView - improve SpreadExport performance when not using visual settings
It takes more than a minute to export 15000 cells.
To reproduce:

public Form1()
{
    InitializeComponent();

    //populate with data
    DataTable dt = new DataTable();
    for (int i = 0; i < 50; i++)
    {
        dt.Columns.Add("Col" + i, typeof(string));
    }
    DataColumn col;
    for (int i = 0; i < 3000; i++)
    {
        DataRow newRow = dt.Rows.Add();

        for (int j = 0; j < dt.Columns.Count; j++)
        {
            col = dt.Columns[j];
            newRow[col.ColumnName] = "Data." + i + " " + dt.Columns.IndexOf(col);
        }
    }
    this.radGridView1.DataSource = dt;
    this.radGridView1.BestFitColumns(Telerik.WinControls.UI.BestFitColumnMode.AllCells);
}

private void radButton1_Click(object sender, EventArgs e)
{
    Telerik.WinControls.UI.Export.SpreadExport.SpreadExport spreadExporter;
  
    spreadExporter = new SpreadExport(this.radGridView1,SpreadExportFormat.Xlsx
    );
    spreadExporter.ExportVisualSettings = false; 
    SaveFileDialog dialog = new SaveFileDialog();
    dialog.FilterIndex = 1;
    dialog.DefaultExt = "*.xlsx";
    dialog.Filter = "Excel file |*.xlsx";
    if (dialog.ShowDialog() == DialogResult.OK)
    {
        Stopwatch sw = new Stopwatch();
        sw.Start();
        string fileName = dialog.FileName;
        spreadExporter.RunExport(fileName);
        sw.Stop();
        Console.WriteLine(string.Format("Elapsed {0}", sw.Elapsed));
        Process.Start(fileName);
    }
}

1 comment
ADMIN
Ivan Petrov
Posted on: 17 Apr 2015 09:50
In our Q2 2015 release we will introduce a new export option, which will perform the export operation in a separate thread. This new export functionality will improve the export performance and will also support cancellation and progress reporting.