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

External export button for RadGrid

1 Answer 105 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Julian
Top achievements
Rank 1
Julian asked on 08 Jan 2021, 11:13 PM

I am fairly new to telerik and web forms but I have a page with a RadGrid and separate button for the export. When I click on the export button I get an ArgumentOutOfRangeException. I set export settings on the RadGrid as follows 

<ExportSettings
      IgnorePaging="true"
      ExportOnlyData="true"
      Excel-Format="Xlsx"
      OpenInNewWindow="true">
ExportSettings>

For the export button:

protected void rbtnExport_Click(object sender, EventArgs e)

{
            rgBidActivity.ExportSettings.FileName = "BidActivity";
            rgBidActivity.MasterTableView.ExportToExcel();
}

 

So I am not sure what exactly is causing the error in the attached image. Any suggetions?

 

1 Answer, 1 is accepted

Sort by
0
Attila Antal
Telerik team
answered on 13 Jan 2021, 02:54 PM

Hi Julian,

The problem you are reporting is complaining about a Value range.  must be with the settings of the Control. The external export button and the code to be called seems correct.

Try removing a few properties/values you are manually setting for the control and then try the export again.

I can also check out the problem, but for that, I will require the source code. Share the ASPX page and ASPX.cs/vb and I will verify if I can spot the problem.

Regards,
Attila Antal
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
Julian
Top achievements
Rank 1
Answers by
Attila Antal
Telerik team
Share this question
or