Hi All, I am following the Load on Demand RadPageView example and everything is working correctly except for the fact that I am trying to load PageIndex 2 and show PageIndex 2. When I do this the tab shows up blank as if nothing was loaded. I believe the actual tab is loading but at index 0, any guidance or a how to will be much appreciated.
Thanks
-----------
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
AddTab(
"General Information");
AddTab(
"Change Password");
AddTab(
"Quick Links");
AddTab(
"Application Access");
int i = -1;
if (Request.QueryString["PageIndex"] != null)
Int32.TryParse(Request.QueryString["PageIndex"], out i);
switch (i)
{
case 2:
RadMultiProfile.SelectedIndex = 2;
RadTabProfile.SelectedIndex = 2;
AddPageView(RadTabProfile.FindTabByText(
"Quick Links"));
break;
default:
AddPageView(RadTabProfile.FindTabByText(
"General Information"));
break;
}
}
}
private void AddTab(string tabName)
{
RadTab tab = new RadTab();
tab.Text = tabName;
RadTabProfile.Tabs.Add(tab);
}
private void AddPageView(RadTab tab)
{
RadPageView pageView = new RadPageView();
pageView.ID = tab.Text;
RadMultiProfile.PageViews.Add(pageView);
tab.PageViewID = pageView.ID;
}
protected void RadTabProfile_TabClick(object sender, RadTabStripEventArgs e)
{
AddPageView(e.Tab);
e.Tab.PageView.Selected =
true;
}
protected void RadMultiProfile_PageViewCreated(object sender, RadMultiPageEventArgs e)
{
string userControlName = "Controls/" + e.PageView.ID.Replace(" ", "") + ".ascx";
Control userControl = Page.LoadControl(userControlName);
userControl.ID = e.PageView.ID +
"_userControl";
e.PageView.Controls.Add(userControl);
}