Hi,
I have a main page (default.aspx) with a RadTabStrip, and associated RadMultiPage and RadPageViews. The RadPageViews use ContentURL to load their content. On the first ContentURL page I have a button which when clicked should cause the RadTabStrip's second tab to be selected. This is somewhat similar to the TabStrip/Wizard demo program. My problem is in the first ContentURL page's button clicked callback I can't get the reference to the RadTabStrip control using FindControl - FindControl returns null. Is what I'm trying to do possible?
Thanks,
Mike
Here's my code:
default.aspx:
administrativeHub.aspx:
administrativeHub.aspx.cs:
I have a main page (default.aspx) with a RadTabStrip, and associated RadMultiPage and RadPageViews. The RadPageViews use ContentURL to load their content. On the first ContentURL page I have a button which when clicked should cause the RadTabStrip's second tab to be selected. This is somewhat similar to the TabStrip/Wizard demo program. My problem is in the first ContentURL page's button clicked callback I can't get the reference to the RadTabStrip control using FindControl - FindControl returns null. Is what I'm trying to do possible?
Thanks,
Mike
Here's my code:
default.aspx:
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
<
Scripts
>
<%--Needed for JavaScript IntelliSense in VS2010--%>
<%--For VS2008 replace RadScriptManager with ScriptManager--%>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.Core.js"
/>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.jQuery.js"
/>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.jQueryInclude.js"
/>
</
Scripts
>
</
telerik:RadScriptManager
>
<
div
id
=
"wrap"
>
<
div
id
=
"inner-wrap"
>
<
div
id
=
"main"
>
<
telerik:RadTabStrip
ID
=
"RadTabStrip1"
runat
=
"server"
SelectedIndex
=
"0"
MultiPageID
=
"RadMultiPage1"
Skin
=
"Black"
>
<
Tabs
>
<
telerik:RadTab
runat
=
"server"
BackColor
=
"Black"
Text
=
"Home"
>
</
telerik:RadTab
>
<
telerik:RadTab
runat
=
"server"
BackColor
=
"Black"
Text
=
"Users"
>
</
telerik:RadTab
>
</
Tabs
>
</
telerik:RadTabStrip
>
<
telerik:RadMultiPage
ID
=
"RadMultiPage1"
SelectedIndex
=
"0"
runat
=
"server"
>
<
telerik:RadPageView
ID
=
"RadPageView1"
ContentUrl
=
"administrativeHub.aspx"
runat
=
"server"
Height
=
"250px"
>
</
telerik:RadPageView
>
<
telerik:RadPageView
ID
=
"RadPageView2"
ContentUrl
=
"users.aspx"
runat
=
"server"
Width
=
"100%"
Height
=
"150px"
>
Users</
telerik:RadPageView
>
</
telerik:RadMultiPage
>
</
div
>
</
div
>
</
div
>
</
form
>
</
body
>
administrativeHub.aspx:
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
</
telerik:RadScriptManager
>
<
telerik:RadButton
ID
=
"UserListB"
runat
=
"server"
Text
=
"User List"
ButtonType
=
"LinkButton"
Skin
=
"Black"
ToolTip
=
"Add users, remove users, and edit user information"
Width
=
"170px"
OnClick
=
"UserListBClick"
>
</
telerik:RadButton
>
</
form
>
</
body
>
administrativeHub.aspx.cs:
namespace RadControlsDemo
{
public partial class administrativeHub : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void UserListBClick(object sender, EventArgs e)
{
//The following call to FindControl returns null
RadTabStrip tabStrip = (RadTabStrip)Page.FindControl("RadTabStrip1");
RadTab UsersTab = tabStrip.FindTabByText("Users");
UsersTab.Enabled = true;
UsersTab.Selected = true;
}
}
}