We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to dock a control to a container control

Thread ID:

Created:

Updated:

Platform:

Replies:

91591 Nov 24,2009 10:03 PM UTC Nov 26,2009 05:20 AM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: Tools
feifeima2008
Asked On November 24, 2009 10:03 PM UTC

How to dock a control to a container control,such as docking a treeView (or dataGrid) to tabPage

Venkatesh S [Syncfusion]
Replied On November 26, 2009 05:20 AM UTC

Hi,

TreeView can be docked inside a Tabstrip by embedding treeview in a multipage. Kindly view the code snippet below to achieve

this:

[C#]


TabStripItem t = new TabStripItem(); // Creating a Tab
t.Text = "TreeView1";
t.ID = "Tab1";
TabStrip1.Items.Add(t);

PageView Page = new PageView(); // Creating a pageview
Page.ID = "Home";

Syncfusion.Web.UI.WebControls.Tools.TreeView TreeView1 = new Syncfusion.Web.UI.WebControls.Tools.TreeView();
// Treeview is created inside the page

TreeView1.AutoFormat = "Vista";
TreeViewNode root = new TreeViewNode();
root.Text = "File"; // Nodes are added
TreeView1.Items.Add(root);

TreeViewNode n1 = new TreeViewNode();
n1.Text = "New";
root.Items.Add(n1);

TreeViewNode n2 = new TreeViewNode();
n2.Text = "Open";
root.Items.Add(n2);
// Embedding treeview inside multipage
Page.Controls.Add(TreeView1);

MultiPage1.Pages.Add(Page);


I have created a simple sample to test this and it can be downloaded from the link below :

http://help.syncfusion.com//samples/Tools.Web/7.4.0.20/DockTreeinTabStrip/main.htm

Please try to reproduce the sample in your page and let us know if any concerns.

Regards
Venkatesh

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;