FileExplorer does not work within my ajaxified Multipage

6 posts, 0 answers
  1. Bernhard Rosenfelder
    Bernhard Rosenfelder avatar
    24 posts
    Member since:
    Mar 2010

    Posted 12 Apr 2011 Link to this post

    hi community,

    the fileexplorer does not work within my ajaxified multipage. i have provided a demo.

    without ajax:
    http://brosenfelder.redirectme.net/testfileexplorerwithinmultipage/default.aspx

    with ajax:
    http://brosenfelder.redirectme.net/testfileexplorerwithinmultipage/defaultajaxon.aspx

    the fileexplorer is on the second tab. cklick on refresh and then you can see that the refresh does not work.
    is here somthing wrong with the code?

    regards,
    bernahrd

    i have used this code to ajaxifie :
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="Panel1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="Panel1" />
                        <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadMultiPage1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="Panel1" />
                        <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <div>
     
            <asp:Panel ID="Panel1" runat="server">
                <telerik:RadTabStrip ID="RadTabStrip1" runat="server" AutoPostBack="true" MultiPageID="RadMultiPage1">
                    <Tabs>
                        <telerik:RadTab Text="Tab1" Selected="true" PageViewID="RadPageView1"></telerik:RadTab>
                        <telerik:RadTab Text="Tab2" PageViewID="RadPageView2"></telerik:RadTab>
                    </Tabs>
                </telerik:RadTabStrip>
            </asp:Panel>
     
            <telerik:RadMultiPage ID="RadMultiPage1" runat="server" RenderSelectedPageOnly="true">
                <telerik:RadPageView ID="RadPageView1" runat="server" Selected="true">
                    RadPageView1</telerik:RadPageView>
                <telerik:RadPageView ID="RadPageView2" runat="server">
                    <telerik:RadFileExplorer ID="RadFileExplorer1" runat="server"
                        Width="960px"
                        Height="540px"
                        DisplayUpFolderItem="True" EnableCopy="True">
                        <Configuration
                            ViewPaths ="~/fileexplorer" UploadPaths ="~/fileexplorer" DeletePaths="~/fileexplorer/delete" />
                    </telerik:RadFileExplorer>
                </telerik:RadPageView>
                 
            </telerik:RadMultiPage>
  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 15 Apr 2011 Link to this post

    Hi Bernhard,

    The problem occurs because of JavaScript error caused by incorrect configuration of AjaxSettings. In order to ajaxify RadTabStrip / RadMultiPage the RadTabStrip. Here is the correct ajax configuration:
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadTabStrip1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadMultiPage1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>


    Regards,
    Dobromir
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Bernhard Rosenfelder
    Bernhard Rosenfelder avatar
    24 posts
    Member since:
    Mar 2010

    Posted 17 Apr 2011 Link to this post

    hi dobromir,

    thank you for your reply. i have tried this ajax configuration before. your are right that the fileexplorer works with this configuration but i have the problem that with this ajax configuration the tabstrip doesn't update when i have a postback within the multipage.

    http://brosenfelder.redirectme.net/testfileexplorerwithinmultipage/defaultajaxon.aspx hier you can find the same demo with this configuration and with a button on the second tab (below the fileexplorer). when you hit the button the text of tab2 should change to "Test". but it doesn't. the text of tab2 changes when you hit the tab1 (postback within tabstrip).

    regards,
    bernhard
  5. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 20 Apr 2011 Link to this post

    Hi Bernhard,

    The ajaxification of RadTabStrip and RadMultiPage is a bit more complex because the RadPageView is a container and not the control that is actually triggering the postback. In such cases the recommended approach is to have addintional AjaxSetting for the specific controls that need to update the TabStrip. However, in cases where RenderSelectedPageOnly property of RadMultiPage is set to true might cause an error to occur when the trigger control does not present on the page.

    To avoid this problem you need to create the AjaxSetting dynamically when the page on which the trigger control resides is visible.

    For your convenience I have attached a sample page implementing the above mentioned approach.

    Greetings,
    Dobromir
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  6. Bernhard Rosenfelder
    Bernhard Rosenfelder avatar
    24 posts
    Member since:
    Mar 2010

    Posted 21 Apr 2011 Link to this post

    hi dobromir,

    thank you for your sample. your suggestion works within my demo but doesn't in my application scenario because i am using usercontrols within the pageviews. this is because i want to have the possibility to open more than one tab with more than one instances of the usercontrol.

    what i have done:
    1. added RadAjaxManagerProxy1 to the usercontrol
    2. added
    Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As EventArgs) Handles Me.PreRender
     
            Dim AjaxSetting As AjaxSetting = New AjaxSetting("RadButton1")
            AjaxSetting.UpdatedControls.Add(New AjaxUpdatedControl("RadTabStrip1", ""))
     
            RadAjaxManagerProxy1.AjaxSettings.Add(AjaxSetting)
     
    End Sub
    to the usercontrol

    do i make something wrong?

    regards,
    bernhard



  7. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 26 Apr 2011 Link to this post

    Hi Bernhard,

    In scenarios where AjaxSettings are created dynamically you need to add the to the main instance of the RadAjaxManager and not to the RadAjaxManagerProxy control. To access the RadAjaxManager within the user control you can use the GetCurrent() method, e.g.:
    RadAjaxManager.GetCurrent(Page).AjaxSettings.Add....

    I hope this helps.

    Regards,
    Dobromir
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017