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

how to get client id of RadTabStrip without using page parser?

1 Answer 72 Views
UI for ASP.NET AJAX in ASP.NET MVC
This is a migrated thread and some comments may be shown as answers.
Maruthi
Top achievements
Rank 1
Maruthi asked on 01 Aug 2012, 06:05 AM
Hi,
I am using this below  javascript function
but the problem is
how can i get client id withot using,  $find('<%= RadTabStrip1.ClientID%>');

<telerik:RadCodeBlock runat="server" ID="RadCodeBlock1">
<script type="text/javascript">
function UnSelectMyTab(sender, eventArgs)
            {
                
                var tabStrip = $find('<%= RadTabStrip1.ClientID%>');
                if (!tabStrip) return;
                //Find the element which the mouse is over
                var destElement = eventArgs.get_domEvent().eventMapRelatedTarget;
                if ($telerik.isDescendant(tabStrip.get_element(), destElement))
                    return;
                var initialTab = eventArgs.get_tab();
                initialTab.unselect();
                initialTab.selectParents();
            }
     </script>
</telerik:RadCodeBlock>

Can anyone let me know how to do this?

Thanks,
Maruthi

1 Answer, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 06 Aug 2012, 07:55 AM
Hi Maruthi,

In general RadTabStrip is rendered as a "div" element - you can try selecting it by class name with JQuery and then you can obtain the div "id" attribute:
<script type="text/javascript">
    function pageLoad() {
 
        var tabstripClientID = $telerik.$(".RadTabStrip");
        alert(tabstripClientID.attr("id"));
 
    }
</script>
<telerik:RadTabStrip ID="RadTabStrip1" runat="server"
    SelectedIndex="0" MultiPageID="RadMultiPage1">
</telerik:RadTabStrip>

If the issue persists – could you explain the scenario that you want to implement in more details?


Regards,
Kalina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
UI for ASP.NET AJAX in ASP.NET MVC
Asked by
Maruthi
Top achievements
Rank 1
Answers by
Kalina
Telerik team
Share this question
or