I have a grid that hosts a user control containing another grid and a few other controls in a nestedtabletemplate. This user control has a button that invokes the ExportToPdf() function of the grid within the user control. It works fine when the parent grid is not using AJAX, but when the parent grid is AJAXified, it no longer works.
I have the following code in the Page_Load function of the user control....
I have the following code in the Page_Load function of the user control....
if (!IsPostBack)
{
PostBackOptions options = new PostBackOptions(this);
Page.ClientScript.GetPostBackEventReference(options);
PdfButton.Attributes.Add(
"onclick",
string.Format("realPostBack('{0}', ''); return false;", PdfButton.UniqueID));
}
This is based on the documentation, but it clears the grid I am attempting to export when it is clicked instead of doing an export..