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

RenderSelectedPageOnly Javascript Problem

3 Answers 98 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Ada
Top achievements
Rank 1
Ada asked on 29 May 2009, 01:57 PM
I have a tabstrip with multipage which contains 7 Tabs.Due to tab contents i set Multipages RenderSelectedPageOnly=true and also Tabstrips's AutoPostBack=true.All PageViews contains ascx controls and some ascx updates tabs enabled/disabled status.Finally my aspx like this:

    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="rtDosya"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="rmpDosya" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="rmpDosya"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="rtDosya" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManagerProxy> 
    <table id="DosyaDetayEkran"
        <tr> 
            <td valign="top"
                <telerik:RadTabStrip runat="server" ID="rtDosya" Skin="WebBlue" MultiPageID="rmpDosya" 
                    AutoPostBack="true" CausesValidation="False"
                    <Tabs> 
                        <telerik:RadTab runat="server" ID="tabDosya" Text="Dosya" Selected="true"
                        </telerik:RadTab> 
                        <telerik:RadTab runat="server" ID="tabMahkeme" Text="Mahkeme" Selected="true"
                        </telerik:RadTab> 
                        <telerik:RadTab runat="server" ID="tabEvrak" Text="Evrak"
                        </telerik:RadTab> 
                        <telerik:RadTab runat="server" ID="tabDosyaBaglanti" Text="Bağlantılı Dosyalar"
                        </telerik:RadTab> 
                        <telerik:RadTab runat="server" ID="tabTaraflar" Text="Taraflar"
                        </telerik:RadTab> 
                        <telerik:RadTab runat="server" ID="tabTakip" Text="Takipler"
                        </telerik:RadTab> 
                        <telerik:RadTab runat="server" ID="tabDurusma" Text="Duruşma"
                        </telerik:RadTab> 
                    </Tabs> 
                </telerik:RadTabStrip> 
            </td> 
        </tr> 
        <tr> 
            <td style="vertical-align: top; padding: 8px; border: 1px solid black;" valign="top"
                <telerik:RadMultiPage runat="server" ID="rmpDosya" AutoScrollBars="true" RenderSelectedPageOnly="true" 
                    SelectedIndex="0" EnableEmbeddedScripts="true"
                    <telerik:RadPageView ID="rpvDosya" runat="server"
                        <uc1:wucDosya ID="wucDosya1" runat="server" /> 
                    </telerik:RadPageView> 
                    <telerik:RadPageView ID="rpvMahkeme" runat="server"
                        <uc2:wucMahkeme ID="wucMahkeme" runat="server" /> 
                    </telerik:RadPageView> 
                    <telerik:RadPageView ID="rpvEvrak" runat="server"
                        <uc3:wucEvrak ID="wucEvrak" runat="server" /> 
                    </telerik:RadPageView> 
                    <telerik:RadPageView ID="rpvDosyaBaglanti" runat="server"
                        <uc4:wucDosyaBaglanti ID="wucDosyaBaglanti" runat="server" /> 
                    </telerik:RadPageView> 
                    <telerik:RadPageView ID="rpvTaraf" runat="server"
                        <uc5:wucTaraf ID="wucTaraf" runat="server" /> 
                    </telerik:RadPageView> 
                    <telerik:RadPageView ID="rpvTakip" runat="server"
                        <uc6:wucTakip ID="wucTakip" runat="server" /> 
                    </telerik:RadPageView> 
                    <telerik:RadPageView ID="rpvDurusma" runat="server"
                        <uc7:wucDurusma ID="wucDurusma" runat="server" /> 
                    </telerik:RadPageView> 
                </telerik:RadMultiPage> 
            </td> 
        </tr> 
    </table> 


The problem  ascx contains javascript block in RadCodeBlock,but only initial page view javascript codes runs!

3 Answers, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 29 May 2009, 02:09 PM
Hi Ada,

I think it will be best if you can open a support ticket and send us a simple running project (incl. your custom skin, CSS, images, DB backup if needed and so on) demonstrating the problem (and step-by-step instructions on doing so). In that way we can reproduce and pinpoint the problems you're facing on our side, understand the logic of your application and provide a solution.

Thanks beforehand for your patience and cooperation,
Paul
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.
0
TAD RHODES
Top achievements
Rank 1
answered on 08 Sep 2010, 06:27 PM
Was this problem ever resolved?

I having the same exact problem.  Any Javascript/jquery in a RadCodeBlock within a user control throws undefined errors during runtime.  F ex. when a button has onclientclick event with some javascript tied to it.

Can I get a solution?
0
Peter
Telerik team
answered on 13 Sep 2010, 03:13 PM
Hi,

If your javascript code is in the user control and it is not initially visible or it is loaded on demand, the java script will not be registered to the page. In this case you can register the code  from an external js file via RadScriptManager or ScripManager like this:
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Path="~/Scripts/custom.js" />
             
        </Scripts>
    </telerik:RadScriptManager>


Greetings,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TabStrip
Asked by
Ada
Top achievements
Rank 1
Answers by
Paul
Telerik team
TAD RHODES
Top achievements
Rank 1
Peter
Telerik team
Share this question
or