Nested PageView

2 posts, 1 answers
  1. Mark
    Mark avatar
    82 posts
    Member since:
    Jan 2015

    Posted 10 Apr 2017 Link to this post

    I am dynamically adding tabs to a pageview.  How can I add subtabs?

    When I click on a tab, I need the tabs within the top tab to show. 

    Here is the code I have.  The first set of tabs work.  Can't figure how to add child tabs

    //create a tab for each line
    DataTable dt = GetLines();
    if (dt.Rows.Count > 0)
        foreach (DataRow row in dt.Rows)
            RadPageViewPage newLine = new RadPageViewPage();
            newLine.Text = row["DEPARTMENT_DESCRIPTION"].ToString();
            //get the list of what runs on each line (by Department_id)
            DataTable dtLines = GetLineDepartments(Convert.ToInt16(row["DEPARTMENT_ID"].ToString()));
            if (dtLines.Rows.Count > 0)
                foreach (DataRow rowDept in dtLines.Rows)
                    // add depts tabs to the line
                    RadPageViewPage newDept = new RadPageViewPage();
                    newDept.Text = rowDept["LINE_DESCRIPTION"].ToString();
                    //newLine.Controls.Add(newDept);  //how do I add to the newline RadPageViewPage
  2. Answer
    Hristo avatar
    1522 posts

    Posted 11 Apr 2017 Link to this post

    Hi Mark,

    Thank you for writing.

    Each of the tab items is actually a page added to a RadPageView control. If you would like to display an additional strip of items I can suggest adding an additional RadPageView when you click the RadPageViewStripItem of the main control. 

    You can also check the following forum thread discussing how the clicks on the tab items can be intercepted:

    I hope this helps. Please let me know if you need further assistance.

    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top