How to create Custom Node Element in TreeView?

2 posts, 0 answers
  1. Myat Su
    Myat Su avatar
    6 posts
    Member since:
    Oct 2011

    Posted 17 Nov 2011 Link to this post

    I want to show large image in tree node and create border for node.
    So I think, I need to create treeview custom node, am I right?
    Please give me advice how to do, create custom node and do other things?

    Please help me,
    Thank you so much.
    Myat Su
  2. Stefan
    Stefan avatar
    2891 posts

    Posted 22 Nov 2011 Link to this post

    Hello Myat Su,

    Thank you for writing.

    In order to show nodes with bigger images, simply set the desired image to Image property of the desired node and then set the AutoSizeItems property of the TreeViewElement to true, so the nodes will be sized according to their content.

    In order to show borders around the nodes, set the top and bottom border colors of the NodeElement in the NodeFormatting event handler.

    Attached you can find a sample project with the desired functionalities implemented. 

    Let me know if you have any other questions.

    the Telerik team

    Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

  3. DevCraft R3 2016 release webinar banner
Back to Top