This is a migrated thread and some comments may be shown as answers.

Dynamic creation-vertical left problem

1 Answer 54 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 06 Apr 2011, 07:59 AM
I am creating a tabstrip with a pageview that has a radgrid in it.  Based on data that comes from an sql database there may be several tabs that are created dynamically.  I would like to have the tabs strip setup as a vertical left tabstrip.  The tabstrip always display on the top of the pageview.  Here is the creation code:

            RadTabStrip rts = new RadTabStrip();
            rts.ID = "RadTabStrip1";
            rts.MultiPageID = "yearsPages";
            rts.Orientation = TabStripOrientation.VerticalLeft;


            RadMultiPage rmp = new RadMultiPage();
            rmp.ID = "yearsPages";


            this.PlaceHolder1.Controls.Add(rts);
            this.PlaceHolder1.Controls.Add(rmp);


            DataTable dt = DAL.Routines.getDataTableFromSQL("SELECT Distinct Year FROM Scores ORDER BY Year");
            foreach (DataRow dr in dt.Rows)
            {
                RadTab rootTab = new RadTab();
                rts.Tabs.Add(rootTab);
                rootTab.Text = "Year: " + dr["Year"].ToString();
                RadGrid grd;
                RadPageView pv = new RadPageView();
                grd = buildGrid(Convert.ToInt32(dr["Year"]));
                pv.Controls.Add(grd);
                rmp.PageViews.Add(pv);
            }
            rts.SelectedIndex = 0;
            rmp.SelectedIndex = 0;

1 Answer, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 11 Apr 2011, 01:11 PM
Hello Kevin,

Please refer to the following demo of the RadTabStrip. To have the RadMultiPage displayed on the right side of the tabs you will need to applty the following css class slector to the RadMultiPage as shown below: 

code behind:
rmp.CssClass="multiPage";
 
css:
.multiPage
{
    display: -moz-inline-box;
    display: inline-block;
}


Regards,
Kate
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TabStrip
Asked by
Kevin
Top achievements
Rank 1
Answers by
Kate
Telerik team
Share this question
or