This is a migrated thread and some comments may be shown as answers.

[Solved] ExportToExcel don't work in usercontrol

1 Answer 91 Views
Grid
This is a migrated thread and some comments may be shown as answers.
emidio rana
Top achievements
Rank 1
emidio rana asked on 09 Jul 2009, 04:34 PM
Any one can explain to me because this code don't work?
On submit the grid is binding with excel version without open excel application.
This is ASCX file:
----------------------------------------------------------------------------------------------------------------------------------------------------

 

 

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

 

<script type="text/javascript">

 

 

function mngRequestStarted(ajaxManager, eventArgs) {

 

 

if (eventArgs.EventTarget == "mngBtnExcel") {

 

eventArgs.EnableAjax =

false;

 

}

}

 

</script>

 

</

 

telerik:RadCodeBlock>

 

 

<

 

asp:Button ID="mngBtnExcel" runat="server" Text="EXPORT GRID" OnClick="Vai" />

 

 

 

 

<telerik:RadGrid ShowStatusBar="true" EnableAJAX="True"

 

 

ID="RadGrid1" runat="server" Width="97%" Skin="Web20"

 

 

AllowPaging="True" AllowSorting="true" AllowMultiRowSelection="True"

 

 

AutoGenerateColumns="true" GroupingEnabled="true" ShowGroupPanel="true"

 

 

GridLines="Both" >

 

 

<ClientSettings ColumnsReorderMethod="Swap" ReorderColumnsOnClient="true"

 

 

AllowColumnsReorder="true" AllowDragToGroup="true">

 

 

<Selecting AllowRowSelect="True"></Selecting>

 

 

<Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True"

 

 

ResizeGridOnColumnResize="False"></Resizing>

 

 

</ClientSettings>

 

 

<GroupPanel Text="Per raggruppare secondo una colonna, trascinare l'intestazione della colonna su quest'area "></GroupPanel>

 

 

<MasterTableView Width="100%" />

 

 

<PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" Position="TopAndBottom"/>

 

 

<FilterMenu EnableTheming="True">

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

</FilterMenu>

 

 

</telerik:RadGrid>

 

 

 

<telerik:RadAjaxLoadingPanel Skin="Web20" ID="RadAjaxLoadingPanel1" runat="server">

 

 

</telerik:RadAjaxLoadingPanel>

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >

 

 

<ClientEvents OnRequestStart="mngRequestStarted"/>

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="RadGrid1" >

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

 

</telerik:RadAjaxManager>

 

----------------------------------------------------------------------------------------------------------------------------------------------------------
Is very simple and i disabled AJAX function how you can see.
Now this is the code of APSX page to import usercontrol in code behind:
---------------------------------------------------------------------------------------------------------------------------------------------------

 

Dim userControl As New asxc_Griglia25

 

UserControl = LoadControl(

"Griglia.ascx")

 

UserControl.ID =

"Griglia"

 

updCaricaGriglia.ContentTemplateContainer.Controls.Add(userControl)



1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 15 Jul 2009, 08:25 AM
Hello Emidio,

I modified your project and reattached it to your support ticket. Also I recommend you examine the following link: AJAX Manager Proxy
Let me know if you need further assistance.

Regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
emidio rana
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or