Hi,
First i'm sorry for my bad english, I'm not really good. But I will try to explain my problem for you can understand.
I want export my RadGrid in a Excel file (Biff). In my RadGrid I don't use the orignal CommandItem, I have add a personnal RadToolBar where I have add my Export button. When I click of my Button, I call a JS method (onPanelBarItemClicked) who calls the Click Event of my btnExport (this button isn't visible)
The code of btnExport.Click.
With this method, the XLS file is generated and i can download the file. But, I don't have LoadingPanel for show that application working.
If in my JS method I add the method for show the LoadingPanel. The loadingPanel appears and I can donwload my file. But my problem is that the loadingPanel never disappears. (LoadingPanelNeverDisappears.png)
For can resolve this problem. I have added AjaxSettings in the RadAjaxManagerProxy. But i have a new and big problem. After the XLS generation, I can't download my file. And in my RadGrid, my action column has disappeared, the width of my Data Column are too large and the PagerStyle has disappeared. (GridBug.png)
Do you have a solution ? I have search in forum and with google. But the solution isn't really relevant in my situation.
We have :
- MasterPage
- BaseUserControl (all page Inherits)
- Page.
Thank you so much.
Mathieu B.
First i'm sorry for my bad english, I'm not really good. But I will try to explain my problem for you can understand.
I want export my RadGrid in a Excel file (Biff). In my RadGrid I don't use the orignal CommandItem, I have add a personnal RadToolBar where I have add my Export button. When I click of my Button, I call a JS method (onPanelBarItemClicked) who calls the Click Event of my btnExport (this button isn't visible)
function onPanelBarItemClicked(sender, args) {
if (args.get_item().get_commandName() == "ExportToExcel") {
if (!alertDirtyNavigation()) {
return false;
}
$find("<%=btnExport.ClientID%>").click();
}
}
{...}
<
div
style
=
"display: none"
>
<
telerik:RadButton
ID
=
"btnExport"
runat
=
"server"
AutoPostBack
=
"true"
CausesValidation
=
"false"
ButtonType
=
"StandardButton"
Target
=
"_self"
></
telerik:RadButton
>
</
div
>
{...}
<
CommandItemTemplate
>
<
div
>
<
telerik:RadToolBar
ID
=
"RadToolBarGridEdit"
runat
=
"server"
Width
=
"100%"
Height
=
"25px"
OnClientButtonClicked
=
"onPanelBarItemClicked"
>
<
Items
>
<
telerik:RadToolBarButton
Text="<% $Resources:General, ExportButtonText %>" Value="ExportButton" CommandName="ExportToExcel" AccessKey="E" ImageUrl="~/Images/16X16/export.png" ImagePosition="Right" PostBack="false"></
telerik:RadToolBarButton
>
</
Items
>
</
telerik:RadToolBar
>
</
div
>
</
CommandItemTemplate
>
The code of btnExport.Click.
Private
Sub
btnExport_Click(sender
As
Object
, e
As
EventArgs)
Handles
btnExport.Click
GridFunction.ExportGridToExcel(
Me
.RadGridDepartement)
End
Sub
With this method, the XLS file is generated and i can download the file. But, I don't have LoadingPanel for show that application working.
If in my JS method I add the method for show the LoadingPanel. The loadingPanel appears and I can donwload my file. But my problem is that the loadingPanel never disappears. (LoadingPanelNeverDisappears.png)
function onPanelBarItemClicked(sender, args) {
if (args.get_item().get_commandName() == "ExportToExcel") {
if (!alertDirtyNavigation()) {
return false;
}
showMainLoadingPanel("<%=RadGridDepartement.ClientID%>");
$find("<%=btnExport.ClientID%>").click();
}
}
For can resolve this problem. I have added AjaxSettings in the RadAjaxManagerProxy. But i have a new and big problem. After the XLS generation, I can't download my file. And in my RadGrid, my action column has disappeared, the width of my Data Column are too large and the PagerStyle has disappeared. (GridBug.png)
<
telerik:AjaxSetting
AjaxControlID
=
"btnExport"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"btnExport"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGridDepartement"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
Do you have a solution ? I have search in forum and with google. But the solution isn't really relevant in my situation.
We have :
- MasterPage
- BaseUserControl (all page Inherits)
- Page.
Thank you so much.
Mathieu B.