3 Answers, 1 is accepted
0

Emanuel Varga
Top achievements
Rank 1
answered on 05 Oct 2010, 07:42 PM
Hello lee,
Before providing a solution, i wanted to ask you if there isn't any way of switching to the new RadPageView control, because as you might now, the RadTabBar is obsolete and will be removed soon...
Now, if you want to do this, there are a few things you have to know about the RadTabBar, first, by default it just accepts RadItems, not controls, but if you want the TabBar to accept controls, you have to create a group, and set it's EnableHostedControlMode to true, after this you can add the controls you want using the groups ContentPanel.Controls property. If you want to read some more about the RadTabBar control you should take a look at the available documentation (PanelBar Documentation).
I have created a full working example as follows:
Hope this helps, if you have any other questions or comments, please let me know,
Best Regards,
Emanuel Varga
Before providing a solution, i wanted to ask you if there isn't any way of switching to the new RadPageView control, because as you might now, the RadTabBar is obsolete and will be removed soon...
Now, if you want to do this, there are a few things you have to know about the RadTabBar, first, by default it just accepts RadItems, not controls, but if you want the TabBar to accept controls, you have to create a group, and set it's EnableHostedControlMode to true, after this you can add the controls you want using the groups ContentPanel.Controls property. If you want to read some more about the RadTabBar control you should take a look at the available documentation (PanelBar Documentation).
I have created a full working example as follows:
using
System.Windows.Forms;
using
Telerik.WinControls.UI;
public
partial
class
Form1 : Form
{
private
RadPanelBar radPanelBar1 =
new
RadPanelBar();
public
Form1()
{
InitializeComponent();
this
.Load +=
new
System.EventHandler(Form1_Load);
}
void
Form1_Load(
object
sender, System.EventArgs e)
{
radPanelBar1.Dock = DockStyle.Fill;
this
.Controls.Add(radPanelBar1);
var radGroupContacts =
new
RadPanelBarGroupElement();
radGroupContacts.Caption =
"Contacts"
;
var radGroupCalendar =
new
RadPanelBarGroupElement();
radGroupCalendar.Caption =
"Calendar"
;
radPanelBar1.GroupStyle = Telerik.WinControls.PanelBarStyles.ListBar;
var radGroupTree =
new
RadPanelBarGroupElement();
radGroupTree.EnableHostControlMode =
true
;
var radTreeView1 =
new
RadTreeView();
var node1 =
new
RadTreeNode(
"Node1"
);
var node2 =
new
RadTreeNode(
"Node2"
);
var node3 =
new
RadTreeNode(
"Node3"
);
var node4 =
new
RadTreeNode(
"Node4"
);
radTreeView1.Nodes.Add(node1);
radTreeView1.Nodes.Add(node2);
node1.Nodes.Add(node3);
node2.Nodes.Add(node4);
radTreeView1.Dock = DockStyle.Fill;
radGroupTree.ContentPanel.Controls.Add(radTreeView1);
radGroupTree.Caption =
"TreeView Example"
;
radPanelBar1.Items.AddRange(
new
Telerik.WinControls.RadItem[] { radGroupTree, radGroupCalendar, radGroupContacts });
}
}
Hope this helps, if you have any other questions or comments, please let me know,
Best Regards,
Emanuel Varga
0

lee doo
Top achievements
Rank 1
answered on 07 Oct 2010, 03:34 AM
Thanks very much!!
I dont know RadPageVIew is in Component.
simply I use it!!! :)
I dont know RadPageVIew is in Component.
simply I use it!!! :)
0

Emanuel Varga
Top achievements
Rank 1
answered on 07 Oct 2010, 05:24 AM
Hello again Lee,
The PageViewControl is a relatively new control, so it depends on the version of telerik controls you are using, I would recommend updating to the latest version, Q2 2010 SP 2 to take advantage of the new controls and also benefit from the performance increase in the controls provided by the new virtualization mechanism To see more release and other information about this release click here.
Hope this helps, if you have any other questions or comments, please let me know,
Best Regards,
Emanuel Varga
The PageViewControl is a relatively new control, so it depends on the version of telerik controls you are using, I would recommend updating to the latest version, Q2 2010 SP 2 to take advantage of the new controls and also benefit from the performance increase in the controls provided by the new virtualization mechanism To see more release and other information about this release click here.
Hope this helps, if you have any other questions or comments, please let me know,
Best Regards,
Emanuel Varga