Hi,
I have implemented custom export functionality to export RadGrid data.
I have added a menu “Export All Columns” to HeaderContextMenu of Grid, which when clicked Grid data should be exported to CSV.
RadGrid is ajaxified using RadAjaxManager:
<telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="PanelVendor" />
<telerik:AjaxUpdatedControl ControlID="pnlGrid" LoadingPanelID="RadAjaxLoadingPanel1" />
<telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />
</UpdatedControls>
</telerik:AjaxSetting> <AjaxSettings>
<telerik:AjaxSetting AjaxControlID="UsersGrid">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="UsersGrid" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
Following this link http://www.telerik.com/support/code-library/export-radgrid-content-to-excel-word-csv-pdf-with-ajax-enabled , I have added javascript code to disable ajax and make standard postback:
function onRadAjaxRequestStart(ajaxManager, eventArgs) {
if (eventArgs.EventTargetElement.value != undefined && eventArgs.EventTargetElement.value.indexOf("Export") != -1) {
eventArgs.set_enableAjax(false);
ajaxManager.set_enableAJAX(false);
}
}
Now this all works fine and data is exported to CSV when “Export All Columns” header menu is clicked.
But the RadAjaxLoadingPanel is displayed on the grid and it does not go away even after CSV is downloaded.
What do I need to do so that RadAjaxLoadingPanel does not appear while exporting?
I have implemented custom export functionality to export RadGrid data.
I have added a menu “Export All Columns” to HeaderContextMenu of Grid, which when clicked Grid data should be exported to CSV.
RadGrid is ajaxified using RadAjaxManager:
<telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="PanelVendor" />
<telerik:AjaxUpdatedControl ControlID="pnlGrid" LoadingPanelID="RadAjaxLoadingPanel1" />
<telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />
</UpdatedControls>
</telerik:AjaxSetting> <AjaxSettings>
<telerik:AjaxSetting AjaxControlID="UsersGrid">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="UsersGrid" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
Following this link http://www.telerik.com/support/code-library/export-radgrid-content-to-excel-word-csv-pdf-with-ajax-enabled , I have added javascript code to disable ajax and make standard postback:
function onRadAjaxRequestStart(ajaxManager, eventArgs) {
if (eventArgs.EventTargetElement.value != undefined && eventArgs.EventTargetElement.value.indexOf("Export") != -1) {
eventArgs.set_enableAjax(false);
ajaxManager.set_enableAJAX(false);
}
}
Now this all works fine and data is exported to CSV when “Export All Columns” header menu is clicked.
But the RadAjaxLoadingPanel is displayed on the grid and it does not go away even after CSV is downloaded.
What do I need to do so that RadAjaxLoadingPanel does not appear while exporting?