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

[Solved] Prevent Selecting Tab

1 Answer 173 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Support ATT
Top achievements
Rank 1
Support ATT asked on 28 May 2008, 09:10 AM
Hi

I have many Tabs and PageViews. When someone make changes in the Tab1, he has to save the settings, before he can go click to the next Tab2.

I will prevent, to click the next Tab2 and he opens the PageView2.
I realized this before, with previous Version of RadTabStrip. But with the ASP.NET Ajax, something has changed i thinks.

i call this:

<

telerik:RadTabStrip ID="RadTabStrip1" runat="server" OnClientTabSelected="onBeforeClientTabClicked"

function

onBeforeClientTabClicked(sender, args)
{
    
return false;
    //return manageBeforeStatement(); //check if the next Tab is selectable or not.
}

i think, when i return FALSE, then the next is not seletable !

is this so?

best regards
toprak

1 Answer, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 28 May 2008, 12:17 PM
Hi Toprak Abdullah,

Please find below your modified code snippet that works as expected.

<form id="form1" runat="server">  
    <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
 
    <script type="text/javascript">  
    function onBeforeClientTabClicked(sender, eventArgs)  
    {  
        eventArgs.set_cancel(true);              
        //return manageBeforeStatement(); //check if the next Tab is selectable or not.  
    }  
    </script> 
 
    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" SelectedIndex="0" OnClientTabSelecting="onBeforeClientTabClicked">  
        <Tabs> 
            <telerik:RadTab runat="server" Text="Root RadTab1" PageViewID="rdPage1">  
            </telerik:RadTab> 
            <telerik:RadTab runat="server" Text="Root RadTab2" PageViewID="rdPage2">  
            </telerik:RadTab> 
            <telerik:RadTab runat="server" Text="Root RadTab3" PageViewID="rdPage3">  
            </telerik:RadTab> 
        </Tabs> 
    </telerik:RadTabStrip> 
</form> 


Best wishes,
Paul
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
TabStrip
Asked by
Support ATT
Top achievements
Rank 1
Answers by
Paul
Telerik team
Share this question
or