Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 29, 2012 09:18 AM by Infospy
Feb 28, 2012 02:24 PM|LINK
I have a ExtendedGridView that inherits from GridView and has a PagerRow.
In this pagerRow i have a PageSize selector (DDL) , the page navigation controls and now an Export to Excel button.
This button creates a OOXML Excel file and then transmits it through Page.Response.BinaryWrite from a MemoryStream.
The thing here is that I can't use the Page.Response.BinaryWrite in a Partial PostBack, so I have to declare a trigger for this button in the outer UpdataPanel so it does a Full Postback.
But as the button is inside the "PagerRow Template" for the gridView and is not always visible/rendered on the page, the Trigger element throws an exception.
Has anyone has an ideia how to work around this issue?
Feb 29, 2012 02:43 AM|LINK
Feb 29, 2012 09:18 AM|LINK
Thank you for your help.
I've tried those approaxes but while the actual button is inside an Gridview's PagerRow, which is inside a panel, the panel trigger list doesn't find the control.
I've created an SyncImageButton that inherits ImageButton, and has a custom Property "AsynchronousCallback", which is false by default.
Then i overriden the "PreRender" and place the following code:
scriptMan = ScriptManager.GetCurrent(this.Page);
(scriptMan != null)
So, it will register with page's ScriptManager, case it is not null and case AsynchronousCallback is