This is a migrated thread and some comments may be shown as answers.

Radgrid Export after auto filter issue

1 Answer 88 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Justin
Top achievements
Rank 1
Justin asked on 23 Dec 2020, 02:03 PM

I am having an issue when attempting to export a radgrid to excel after utilizing the filters in the auto filter.

Before applying the filter, it works perfectly and exports the data to excel.  After applying the filter, the export does not work and appears to simply rebind the grid; however this time the filter rows are removed.

The data for the grid is populated using the NeedDataSource event.

Through searching the forums, I have found that I should probably be using the ExcelML, but this yields the same results.

protected void radimgbtnExcelExport_Click(object sender, ImageButtonClickEventArgs e)
        {
            radgridUsageRatio.ExportSettings.Excel.Format = GridExcelExportFormat.ExcelML;
            radgridUsageRatio.ExportSettings.IgnorePaging = true;
            radgridUsageRatio.ExportSettings.ExportOnlyData = true;
            radgridUsageRatio.ExportSettings.OpenInNewWindow = true;
            radgridUsageRatio.MasterTableView.Columns[0].Visible = false; //remove command column
            radgridUsageRatio.MasterTableView.Columns[1].Visible = false; //remove command column
            radgridUsageRatio.MasterTableView.ExportToExcel();
        }

 

Any help anyone can provide would be extremely helpful

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 28 Dec 2020, 09:00 AM

Hi Justion,

 

This usually happens when you have AJAX enabled on the page. Is this the case on your side, too? If you have AJAX enabled, try to temporarily remove it and let me about the result:
https://www.telerik.com/support/kb/aspnet-ajax/ajaxmanager/details/get-more-descriptive-errors-by-disabling-ajax

 

Regards,
Eyup
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Justin
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or