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.
Unfortunately, activation email could not send to your email. Please try again.

Adding custom controls dynamically in treeviewadv

Thread ID:

Created:

Updated:

Platform:

Replies:

81945 May 25,2009 08:57 AM May 26,2009 02:11 AM Windows Forms 1
loading
Tags: Tools
Administrator [Syncfusion]
Asked On May 25, 2009 08:57 AM

How do I add custom controls as child node in treeviewadv?
I tried the following code :

Syncfusion.Windows.Forms.Grid.GridControl gridControl1=new Syncfusion.Windows.Forms.Grid.GridControl();
gridControl1[2, 1].Text = "2007";
gridControl1[2, 2].Text = "107,449,525";
gridControl1[2, 3].Text = "1,972,550(sq km) 761,602(sq mi)";

TreeNodeAdv treeNodeAdv8 = new Syncfusion.Windows.Forms.Tools.TreeNodeAdv();
treeNodeAdv8.ChildStyle.EnsureDefaultOptionedChild = true;
treeNodeAdv8.CustomControl = gridControl1;
treeNodeAdv8.EnsureDefaultOptionedChild = true;
treeNodeAdv8.Height = 56;
treeNodeAdv8.Optioned = true;
treeViewAdv1.Nodes.Add(treeNodeAdv8);

I get the grid along with the text "TreeNodeAdv" on the side. How do I only get the grid and not the text?

Poly J [Syncfusion]
Replied On May 26, 2009 02:11 AM

Hi,

Thanks for your interest in Syncfusion Products.
Set the text property of the treenodeAdv to an empty string for hide the text label in the tree node. Please use the below code snippet for set the text property of the treenode.


treeNodeAdv8.Text = "";


Let us know if you need further assistance with this.

Best Regards,
Poly

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.

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.

;