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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

add Custom cotrol on node

Thread ID:





119542 Jul 7,2015 05:44 AM UTC Jul 8,2015 11:05 AM UTC WinForms 1
Tags: TreeViewAdv
Asked On July 7, 2015 05:44 AM UTC

how to add node and GridgroupingCntrol on each node in treeviewAdv at runtime .

Senthil Kumaran Rajan [Syncfusion]
Replied On July 8, 2015 11:05 AM UTC

Hi Pravin,

Thank you for using Syncfusion products.

The reported requirement can be achieved by using Custom control property in TreeNodeAdv. Please refer the below code example.

Code Snippet[C#]:

   //To add the Parent node

   for (i = 0; i < TotalNodeCount; i++)


          TreeNode = new TreeNodeAdv();

          TreeNode.Text = "node" + nodenumber.ToString();




   //To Add child node

   foreach (TreeNodeAdv node in this.treeViewAdv1.Nodes)


          TreeNode = new TreeNodeAdv();

          TreeNode.Text = "node" + nodenumber.ToString();




   //To add the GridGrouping Control as custom control.

    foreach (TreeNodeAdv node in Collect(this.treeViewAdv1.Nodes))


            GridGroup = new GridGroupingControl();

            GridGroup.GridVisualStyles = GridVisualStyles.Metro;

            GridGroup.TopLevelGroupOptions.ShowCaption = false;

            if (node.CustomControl == null)


                  node.CustomControl = GridGroup;

                  GridGroup.DataSource = dt;

                  node.CustomControl.Width = 300;

                  node.Height = 40;



We have also prepared a sample for your reference and it can be downloaded from the below location.

Sample Location : http://www.syncfusion.com/downloads/support/forum/119542/ze/TreeCustom-1373315669

Please refer the below Knowledge Base to add the custom control in TreeViewAdv.

KB Link : http://www.syncfusion.com/kb/4666/how-to-add-custom-controls-in-treeviewadv

Please let us know if you need further assistance.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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