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

Nested PageView

1 Answer 22 Views
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 10 Apr 2017, 07:22 PM

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();
        pvMain.Pages.Add(newLine);
 
        //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
                newLine.
            }
        }
    }
}

1 Answer, 1 is accepted

Sort by
0
Accepted
Hristo
Telerik team
answered on 11 Apr 2017, 01:28 PM
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: http://www.telerik.com/forums/how-to-detect-a-mouse-click-on-a-radpageviewstripitem.

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

Regards,
Hristo
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.
Asked by
Mark
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or