I have a link (lnkSearch) that is ajaxed, which populates a grid when its clicked. (link is ajaxed using RadAjaxManager)
I also have a button (btnExport) in the grid's PagerTemplate, which when clicked does the telerik grid.masterview.ExportToExcel() command.
However, since lnkSearch is ajaxed, the ExportToExcel() command doesn't work.
The lnkSearch is outside of the grid, so the following suggested telerik workaround doesn't get fired off when the user
clicks lnkSearch.
I have also tried the following but it didn't help either.
The ExportToExcel() does work when I disable ajax for the lnkSearch, which I want to avoid.
Thanks for your help!
- weezie
I also have a button (btnExport) in the grid's PagerTemplate, which when clicked does the telerik grid.masterview.ExportToExcel() command.
However, since lnkSearch is ajaxed, the ExportToExcel() command doesn't work.
The lnkSearch is outside of the grid, so the following suggested telerik workaround doesn't get fired off when the user
clicks lnkSearch.
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" ClientEvents-OnRequestStart="OnRequestStart"<script type="text/javascript"> function onRequestStart(sender, args) { if (args.get_eventTarget().indexOf("btnExport") >= 0) args.set_enableAjax(false); } </script> I have also tried the following but it didn't help either.
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) { if (e.Item is GridPagerItem) { Button btnExport = (Button)e.Item.FindControl("btnExport"); ScriptManager.GetCurrent(Page).RegisterPostBackControl(btnExport); } } The ExportToExcel() does work when I disable ajax for the lnkSearch, which I want to avoid.
Thanks for your help!
- weezie