I'm trying to get my link button to work with the RadGrid in generating an Excel file. I have a RadAjaxManager which is performing some AJAX on my page - most notably the link button and grid. However, when clicking the link button nothing happens and after doing some research I think I understand why...
The export functionality cannot use AJAX, therefore it needs to be disabled when making the request. I found a thread in the forums that posted some sample code and it looks great. The only difference (and the one I believe is causing the issue) is that the example is done on a single content page, whereas mine is inheriting a Master Page. So anyway, the client-side code of interest looks like this...
<script type="text/javascript">
function mngRequestStarted(ajaxManager, eventArgs)
{
if(eventArgs.EventTarget == "lnkExcel")
{
eventArgs.EnableAjax = false;
}
}
</script>
This does not have any affect when used within the Master Page. I can actually see a slight movement of the grid so I know Ajax is still working here. After a bit of debugging, I found the if statement never returns true because the control is nested in the Master Page and gets a funky id (thanks ASP.NET).
How do I change the "lnkExcel" part to return the id of the control even when it's on a Master Page?
Thanks.
