RadRabStrip

1 posts, 0 answers
  1. Prabhanjan
    Prabhanjan avatar
    2 posts
    Member since:
    Jan 2011

    Posted 28 Jan 2011 Link to this post

    Hi

    In my application i'm using RadTabStrip and it has five .ascx control.
    In all the .ascx control user will fill his/her data.when user will login first time
    then all the tab are in disable mode. now i want if user fill more then one page
    and save then signout.again when ever he login then all the tab(where user has fill data)
    should be in active mode.Plz help me.Here is code of my application.

    ----------------------------------------------------
    <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="RegistrationForm" %>

    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

    <%--<%@ Register src="Preview.ascx" tagname="Preview" tagprefix="uc1" %>
    --%>
    <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        <div class="exampleWrapper">
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
                <telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1" IsSticky="true">
                </telerik:RadAjaxLoadingPanel>       
               
                <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" LoadingPanelID="LoadingPanel1">
                    <div style="float:left; width:500px">
                        <telerik:RadTabStrip ID="RadTabStrip1" SelectedIndex="0" runat="server" MultiPageID="RadMultiPage1" CssClass="tabStrip">
                        </telerik:RadTabStrip>
                        <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" OnPageViewCreated="RadMultiPage1_PageViewCreated" CssClass="multiPage">
                        </telerik:RadMultiPage>
                    </div>
                    <%--<div class="previewWrapper">
                        <uc1:Preview ID="previewControl" runat="server" />
                    </div>--%>
                </telerik:RadAjaxPanel>
            </div>
    </asp:Content>


    ---------------------------------------------------------------------------CS------------------------------------------------------------------------------------

    using System;
    using System.Collections;
    using System.Configuration;
    using System.Data;
    using System.Linq;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Xml.Linq;
    using Telerik.Web.UI;

    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                AddTab("Personal Info", true);


                RadPageView pageView = new RadPageView();
                pageView.ID = "PersonalInfo";
                RadMultiPage1.PageViews.Add(pageView);


                AddTab("Academic Details", false);
                AddTab("Family Details", false);
                AddTab("Exprience", false);
                AddTab("Location Preference", false);

            }
        }
        private void AddTab(string tabName, bool enabled)
        {
            RadTab tab = new RadTab(tabName);
            tab.Enabled = enabled;
            RadTabStrip1.Tabs.Add(tab);
        }

        protected void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e)
        {
            Control pageViewContents = LoadControl(e.PageView.ID + ".ascx");
            pageViewContents.ID = e.PageView.ID + "userControl";

            e.PageView.Controls.Add(pageViewContents);
        }
    }

    ---------------------------------And all the ascx control----------------------------------------------------------------------------------
      private void GoToNextTab()
        {
            ContentPlaceHolder placeHolder = (ContentPlaceHolder)Page.Master.FindControl("ContentPlaceHolder1");
            RadTabStrip tabStrip = (RadTabStrip)placeHolder.FindControl("RadTabStrip1");
            RadTab AcademicDetailsTab = tabStrip.FindTabByText("Academic Details");
            AcademicDetailsTab.Enabled = true;
            AcademicDetailsTab.Selected = true;

            GoToNextPageView();
        }

        private void GoToNextPageView()
        {
            ContentPlaceHolder placeHolder = (ContentPlaceHolder)Page.Master.FindControl("ContentPlaceHolder1");
            RadMultiPage multiPage = (RadMultiPage)placeHolder.FindControl("RadMultiPage1");
            RadPageView AcademicDetailsPageView = multiPage.FindPageViewByID("Academic Details");
            if (AcademicDetailsPageView == null)
            {
                AcademicDetailsPageView = new RadPageView();
                AcademicDetailsPageView.ID = "AcademicDetails";
                multiPage.PageViews.Add(AcademicDetailsPageView);
            }
            AcademicDetailsPageView.Selected = true;
        }


    Help me..........................
Back to Top