I am trying to export a PDF file but it does nothing when I click the button. I put the image inside the CommandDisplay area b/c that is where the customer wants it. Any help would be greatly appreciated.
<MasterTableView .... CommandItemDisplay="Top">
<CommandItemTemplate>
<asp:ImageButton ID="btnPDF" runat="server" ImageUrl="~/Images/Pdf.png" OnClick="btnPDF_Click" />
</CommandItemTemplate>
protected void btnPDF_Click(object sender, ImageClickEventArgs e)
{
ConfigureExport();
rgrdData.MasterTableView.ExportToPdf();
}
public void ConfigureExport()
{
rgrdData.ExportSettings.ExportOnlyData = true;
rgrdData.ExportSettings.IgnorePaging = true;
rgrdData.ExportSettings.OpenInNewWindow = true;
}