Hi,
I've a RadGrid with an ExcelExportButton (CommandItemSettings ShowExportToExcelButton) in a RadAjaxPanel and a RadAjaxLoadingPanel. Everything works fine until I press the Export to Excel button, then the Excel appears, but RadAjaxLoadingPanel still "thinking" and never dissapear (do postbak).
Javascript to show Excel without ajax and trying to hide the RadAjaxLoadingPanel:
RadAjaxManager:
RadGrid with Expot to Excel button in CommandItemSetting:
Everything works fine (export to Excel included) but when I press the Export button the RadAjaxPanel continues like the file attached.
Can you help me to hide the radajaxloadingpanel after press the export button?
Thank you!
I've a RadGrid with an ExcelExportButton (CommandItemSettings ShowExportToExcelButton) in a RadAjaxPanel and a RadAjaxLoadingPanel. Everything works fine until I press the Export to Excel button, then the Excel appears, but RadAjaxLoadingPanel still "thinking" and never dissapear (do postbak).
Javascript to show Excel without ajax and trying to hide the RadAjaxLoadingPanel:
<script type=
"text/javascript"
>
function
removePanel() {
$telerik.findControl(document,
"RadAjaxLoadingPanel1"
).hide();
}
function
onRequestStart(sender, args) {
if
(args.get_eventTarget().indexOf(
"ExportToExcelButton"
) >= 0 ||
args.get_eventTarget().indexOf(
"ExportToWordButton"
) >= 0 ||
args.get_eventTarget().indexOf(
"ExportToPdfButton"
) >= 0 ||
args.get_eventTarget().indexOf(
"ExportToCsvButton"
) >= 0) {
setTimeout(removePanel, 10);
args.set_enableAjax(
false
);
}
}
</script>
RadAjaxManager:
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
ClientEvents
OnRequestStart
=
"onRequestStart"
></
ClientEvents
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"gdvBuscarACPs"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"gdvBuscarACPs"
></
telerik:AjaxUpdatedControl
>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
RadGrid with Expot to Excel button in CommandItemSetting:
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
Skin
=
"Office2010Silver"
></
telerik:RadAjaxLoadingPanel
>
<
telerik:RadAjaxPanel
ID
=
"RadAjaxPanel1"
runat
=
"server"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
>
.........
<
telerik:RadGrid
ID
=
"gdvBuscarACPs"
runat
=
"server"
AllowSorting
=
"true"
Width
=
"1125px"
Height
=
"400px"
Skin
=
"Sunset"
OnNeedDataSource
=
"gdvBuscarACPs_NeedDataSource"
OnItemDataBound
=
"gdvBuscarACPs_ItemDataBound"
OnItemCommand
=
"gdvBuscarACPs_ItemCommand"
OnExcelExportCellFormatting
=
"gdvBuscarACPs_ExcelExportCellFormatting"
>
<
ExportSettings
HideStructureColumns
=
"true"
OpenInNewWindow
=
"true"
></
ExportSettings
>
<
MasterTableView
TableLayout
=
"Fixed"
AutoGenerateColumns
=
"false"
DataKeyNames
=
"ID"
NoDetailRecordsText
=
"No hay resultados"
NoMasterRecordsText
=
"No hay resultados."
ShowFooter
=
"true"
CommandItemDisplay
=
"Top"
>
<
CommandItemSettings
ShowAddNewRecordButton
=
"false"
ShowExportToPdfButton
=
"false"
ShowExportToWordButton
=
"false"
ShowExportToExcelButton
=
"true"
ShowExportToCsvButton
=
"false"
ShowRefreshButton
=
"false"
></
CommandItemSettings
>
<
Columns
>
.............
</
Columns
>
</
MasterTableView
>
<
ClientSettings
EnableRowHoverStyle
=
"true"
>
<
Selecting
AllowRowSelect
=
"true"
EnableDragToSelectRows
=
"false"
/>
<
Scrolling
AllowScroll
=
"true"
UseStaticHeaders
=
"true"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
</telerik:RadAjaxPanel>
Everything works fine (export to Excel included) but when I press the Export button the RadAjaxPanel continues like the file attached.
Can you help me to hide the radajaxloadingpanel after press the export button?
Thank you!