How to disable ajax for an individual rad tab on a radstrip

4 posts, 0 answers
  1. Joseph
    Joseph avatar
    9 posts
    Member since:
    Jun 2007

    Posted 07 Jul 2015 Link to this post

    Hello I was wondering if it were possible to disable ajax for just an individual tab so that when clicked it can do the full post back (triggering an export of radgrid).

     I have a handler that sets up the disabled ajax controls for each page: (the following works, however I only want a single rad tab on the strip to do full post backs, however when I put the ID of the radtab (ERA_Tab) in place of rts_ClaimEditor (the radtabstrip) in the "target.indexOf()" portion, it no longer works.

     ScriptManager.RegisterStartupScript(Page,
                    typeof(Page),
                    "disableAjaxOnExport_" + this.UniqueID, @"
                        OnAjaxRequestStart.handlers.push(function(sender, args){{
                            var target = args.get_eventTarget();
                            if (target.indexOf('btnERAPDF') >= 0 || target.indexOf('btnERAExcel') >= 0 || target.indexOf('rts_ClaimEditor')){{
                                args.set_enableAjax(false);
                            }}
                        }});",
                    true);

     

    Here also is the radajaxmangerproxy

      <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    <AjaxSettings>
       <telerik:AjaxSetting AjaxControlID="rts_ClaimEditor">
           <UpdatedControls>
       <telerik:AjaxUpdatedControl ControlID="rmp_ClaimEditor" LoadingPanelID="ClaimEditorLoadingPanel" UpdatePanelCssClass="" />
       <telerik:AjaxUpdatedControl ControlID="rts_ClaimEditor" UpdatePanelCssClass="" />
    </UpdatedControls>
       </telerik:AjaxSetting>        
            <telerik:AjaxSetting AjaxControlID="ERA_Tab">

            </telerik:AjaxSetting>

    </AjaxSettings>
        </telerik:RadAjaxManagerProxy>

     

    and lastly here is my tab strip

    <telerik:RadTabStrip ID="rts_ClaimEditor" runat="server" SelectedIndex="0" Orientation="VerticalLeft" MultiPageID="rmp_ClaimEditor" EnableEmbeddedSkins="False" ClickSelectedTab="true" AutoPostBack="true"
       OnTabClick="rts_ClaimEditor_TabClick">
       <Tabs>
    <telerik:RadTab runat="server" CssClass="tab" SelectedCssClass="tabSelected" HoveredCssClass="tabHovered"  PageViewID="pv_Summary" ImageUrl="/Images/icons/claimremedi_icon_ClaimEditor_Summary.png" TabIndex="1" Text="SUMMARY" Selected="True" Value="1"></telerik:RadTab>
    <telerik:RadTab runat="server" CssClass="tab" SelectedCssClass="tabSelected" HoveredCssClass="tabHovered"  PageViewID="pv_Details" ImageUrl="/Images/icons/claimremedi_icon_Enrollment.png" TabIndex="2"  Text="CHARGE DETAILS" Value="2" ></telerik:RadTab>
    <telerik:RadTab runat="server" CssClass="tab" SelectedCssClass="tabSelected" HoveredCssClass="tabHovered"  PageViewID="pv_ProvInfo" ImageUrl="/Images/icons/claimremedi_icon_ClaimEditor_provider.png" TabIndex="3" Text="PROVIDER INFO" Value="3" ></telerik:RadTab>
    <telerik:RadTab runat="server" CssClass="tab" SelectedCssClass="tabSelected" HoveredCssClass="tabHovered"  PageViewID="pv_Editor" ImageUrl="/Images/icons/claimremedi_icon_Enrollment_Notes.png" TabIndex="4" Text="EDITOR" Value="4" Visible="false"></telerik:RadTab>
    <telerik:RadTab runat="server" CssClass="tab" SelectedCssClass="tabSelected" HoveredCssClass="tabHovered"  PageViewID="pv_Form" ImageUrl="/Images/icons/claimremedi_icon_ClaimEditor_form.png" TabIndex="5" Text="FORM" Value="5" ></telerik:RadTab>
    <telerik:RadTab runat="server" CssClass="tab" SelectedCssClass="tabSelected" HoveredCssClass="tabHovered"  PageViewID="pv_Audit" ImageUrl="~/Images/icons/ClaimView_audit1.png" TabIndex="6" Text="AUDIT" Value="6" ></telerik:RadTab>
    <telerik:RadTab runat="server" CssClass="tab" SelectedCssClass="tabSelected" HoveredCssClass="tabHovered"  PageViewID="pv_Notes" ImageUrl="/Images/Icons/ClaimView_claimnotes1.png" TabIndex="7" Text="NOTES" Value="7" ></telerik:RadTab>
    <telerik:RadTab runat="server" CssClass="tab" SelectedCssClass="tabSelected" HoveredCssClass="tabHovered"  PageViewID="pv_Assign" ImageUrl="/Images/icons/ClaimView_assign1.png" TabIndex="8" Text="ASSIGN" Value="8" ></telerik:RadTab>
    <telerik:RadTab runat="server" CssClass="tab" SelectedCssClass="tabSelected" HoveredCssClass="tabHovered"  PageViewID="pv_Archive" ImageUrl="/Images/icons/archive_circle28x.png" TabIndex="9" Text="ARCHIVE" Value="9" ></telerik:RadTab>
            <telerik:RadTab ID="ERA_Tab" runat="server" CssClass="tab" SelectedCssClass="tabSelected" HoveredCssClass="tabHovered"  PageViewID="pv_ERA" ImageUrl="/Images/icons/claimremedi_roundicon_era_Sm.png" TabIndex="10" Text="VIEW ERA" Value="10" ></telerik:RadTab>
       
            </Tabs>
    </telerik:RadTabStrip>

  2. Nencho
    Admin
    Nencho avatar
    1458 posts

    Posted 10 Jul 2015 Link to this post

    Hello Joseph,

    I would suggest you to handle the OnClientTabSelecting client-side event of the RadTabStrip and verify the text of the currently selected tab. If it is the one, that you need to trigger a full postback on, you can use the
    set_enableAjax(false). Consider the below implementation:

    <script type="text/javascript">
                function OnClientTabSelecting(sender, args) {
                    var mngr = $find("RadAjaxManager");
     
                    if (args.get_tab().get_text() === "Vendors")
                        mngr.set_enableAJAX(false);
                }
            </script>


    Regards,
    Nencho
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Joseph
    Joseph avatar
    9 posts
    Member since:
    Jun 2007

    Posted 10 Jul 2015 in reply to Nencho Link to this post

    Thank you, I implemented something simliar, but instead, the OnClientTabSelecting cancels the post back and instead programatically clicks on a button that is not ajax enabled to perform the operation. I will attempt to use your code instead. Thank you.
  5. Nencho
    Admin
    Nencho avatar
    1458 posts

    Posted 15 Jul 2015 Link to this post

    Hello Joseph,

    You can test the previously suggested approach at your end and let us know if you have any further questions.

    Regards,
    Nencho
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top