Create RadTabstrip programmatically

2 posts, 0 answers
  1. Prava kafle
    Prava kafle avatar
    212 posts
    Member since:
    Apr 2010

    Posted 01 Nov 2011 Link to this post

    Hi,
    I am trying to create a RadTabstrip dynamically and add it to a placeholder.  Tab pages donot show  up , given below is my code .


            protected void Page_Init(object source, System.EventArgs e)
            {
     
                string tableName = "Ticket";
                Panel currentPanel = new Panel();
                currentPanel.ID = tableName + "Panel3";

                RadTabStrip currentTabStrip = new RadTabStrip();
                currentTabStrip.ID = "RadTabStrip1";

                RadMultiPage currentMultiPage = new RadMultiPage();
                currentMultiPage.ID = "MultiPage1";
              
                currentTabStrip.MultiPageID =MultiPage1;
                currentMultiPage.Width = Unit.Percentage(80);
                currentMultiPage.Height = Unit.Percentage(60.0);
                currentMultiPage.SelectedIndex = 0;
                currentTabStrip.SelectedIndex = 0;
              
              string sql = "Select * from Table1";
              DataTable dt = di.GetDataTable(sql);
                int count = 0;
                foreach (DataRow currentRow in dt.Rows)
                {
                    string foreignTable = currentRow["foreigntab"].ToString();

                    RadTab currentTab = new RadTab();
                    currentTab.Text = foreignTable;
                 
                    RadPageView currentPageView = new RadPageView();
                    currentPageView.ID = "pageView" + (count as string)  ;
                   
                    currentPageView.Width = Unit.Pixel(400);
                    currentPageView.Height = Unit.Pixel(300);
                    currentPageView.ContentUrl = "http://www.telerik.com/";
               
                   currentTab.PageViewID = "pageView" + (count as string)  ;

                    currentMultiPage.PageViews.Add(currentPageView);
                    currentTabStrip.Tabs.Add(currentTab);
     
                    count++;
                }

    Any idea?
    Prava
  2. Prava kafle
    Prava kafle avatar
    212 posts
    Member since:
    Apr 2010

    Posted 01 Nov 2011 Link to this post

    Had a bug, found and fixed it.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top