I've got a RadGrid on a page with an Excel image above it. The onClick property of the image calls Button1_Click.
The Button1_Click code on the .cs page is:
The problem is that when clicking the image, instead of a new window opening with an Excel spreadsheet or download dialog box, the current screen is just refreshed displaying the entire contents of the grid instead of the 20 records per page. I don't know why the command would not be generating the Excel file.
Thanks for your help!
The Button1_Click code on the .cs page is:
protected
void
Button1_Click(
object
sender, System.EventArgs e)
{
RadGrid1.ExportSettings.FileName =
"Items"
;
RadGrid1.ExportSettings.ExportOnlyData =
true
;
RadGrid1.ExportSettings.IgnorePaging =
true
;
RadGrid1.ExportSettings.OpenInNewWindow =
true
;
RadGrid1.MasterTableView.ExportToExcel();
}
The problem is that when clicking the image, instead of a new window opening with an Excel spreadsheet or download dialog box, the current screen is just refreshed displaying the entire contents of the grid instead of the 20 records per page. I don't know why the command would not be generating the Excel file.
Thanks for your help!