Basically I just want to set a tab on a RadTabStrip to be selected but I seem to be falling at the first fence.
According to the documentation
http://www.telerik.com/help/aspnet-ajax/tab_clientsideradtab.html
you can use this syntax...
var tabStrip = $find("<%=RadTabStrip1.ClientID%>");
Unfortunately no matter where I put this bit of code it always returns null.
I've been trying to do this for about 3 hours now and it's driving me nuts.
I've also tried
var tabStrip = <%=RadTabStrip1.ClientID%>;
Which only returns a value if placed after the definition of the RadTabStrip, as you might expect. However it doesn't have any of the published client-side methods associated with it.
Baffled.
------------------------------
Created a very simple page with virtual nothing in it - still doesn't work....
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<telerik:RadTabStrip ID="RadTabStrip1" runat="server">
<Tabs>
<telerik:RadTab runat="server" Text="Tab1">
</telerik:RadTab>
<telerik:RadTab runat="server" Text="Tab2">
</telerik:RadTab>
</Tabs>
</telerik:RadTabStrip>
<div>
</div>
</form>
<script type="text/javascript" >
var tabStrip = $find("<%= RadTabStrip1.ClientID %>");
if(tabStrip == null)
alert("bad");
</script>
</body>
//testButton is the button that needs to be right clicked for the menu to pop up
testButton = new LinkButton();
testButton.ID = "test_menu";
testButton.Text = "Test";
menu = new RadContextMenu();
menu.ID = "RadContextMenu1";
menu.Skin = "Vista";
RadMenuItem item1 = new RadMenuItem();
item1.Text = "Hello";
item1.Value = "1";
menu.Items.Add(item1);
ContextMenuControlTarget aaa=new ContextMenuControlTarget();
aaa.ControlID = "test_menu";
menu.Targets.Add(aaa);
Controls.Add(menu);
Controls.Add(testButton);
I also have a script manager and RadAjaxPanel in the method OnInit()
I then render the testButton in the RenderContents() method.
I can see the button but it does not do anything.
<SafeControl Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI" TypeName="*" Safe="True" AllowRemoteDesigner="True" />
This happens immediately after I deploy the RadEditorMoss.wsp.
Is anyone else experiencing the same issue?
Thanks,
Dave
| <telerik:RadTreeView ID="treeProducts" runat="server" CheckBoxes="true" |
| DataFieldID="ProductID" DataFieldParentID="ParentProductID" DataSourceID="odsProducts" |
| DataTextField="ProductName" DataValueField="ProductID" |
| OnClientNodeChecking="ProductChecking"> |
| </telerik:RadTreeView> |
| function ProductChecking(sender, eventArgs) |
| { |
| var node = eventArgs.get_node() |
| if(node.get_nodes().get_count() > 0) |
| { |
| for (var i=0; i<node.get_nodes().get_count();i++) |
| { |
| var childnode = node.get_nodes().getNode(i); |
| childnode.set_checked(true); |
| } |
| } |
| } |