Multiline RadTreeViewItem

4 posts, 0 answers
  1. Serrin
    Serrin avatar
    286 posts
    Member since:
    Sep 2008

    Posted 18 Feb 2009 Link to this post

    Hey folks!

    I'm trying to figure this out, and while I can hack it, I don't want to sacrifice the theme styling of RadTreeViewItem.  So, is there any easy way to make a TreeViewItem multi-line?  I've tried setting width, but the content just stretches out and creates a scrollbar. 

    Thanks!!
    Serrin
  2. Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 20 Feb 2009 Link to this post

    Hi Serrin,

    If you want to make a TreeViewItem multi-line you can use one of these techniques:

    1.The easier way to have multi-lineTreeView items is to change the header property. You can do this either with HeaderTemplate or simply:
    <telerik:RadTreeView >
                    <telerik:RadTreeViewItem.Header>
                        <StackPanel>
                          <TextBlock TextWrapping="Wrap" Text="Some text 1" />
                           <TextBlock  TextWrapping="Wrap" Text="Some text 2" />
                        //some other content
                        </StackPanel>
                    </telerik:RadTreeViewItem.Header>
                </telerik:RadTreeViewItem>
    <telerik:RadTreeView>

    2.You can also set  ItemContainerStyle property the desired style and to fully customize the appearance of your treeview items. For more information please visit the following online example:
    http://demos.telerik.com/silverlight/default.aspx#TreeView/Lookless

    3. Another option is to use DataTemplate. For more information please check::
    http://demos.telerik.com/silverlight/default.aspx#TreeView/TemplateSelector

    I hope this helps.

    All the best,
    Boryana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft banner
  4. Scott Laughton
    Scott Laughton avatar
    12 posts
    Member since:
    May 2006

    Posted 20 Mar 2009 Link to this post

    Hi there,

    The links refered to in this thread no longer work:

    2.You can also set  ItemContainerStyle property the desired style and to fully customize the appearance of your treeview items. For more information please visit the following online example:
    http://demos.telerik.com/silverlight/default.aspx#TreeView/Lookless

    3. Another option is to use DataTemplate. For more information please check::
    http://demos.telerik.com/silverlight/default.aspx#TreeView/TemplateSelector

    Where can I find this information now?

    Regards,

        Scott.
  5. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 20 Mar 2009 Link to this post

    Hello Scott,

    At the time when the reply was posted the links were correct, but after our Q1 2009 release there were some changes to the demos. I apologize for any inconvenience this may have caused you.

    Here are the updated links (in the same order):

    http://demos.telerik.com/silverlight/default.aspx#TreeView/TemplatedNodes
    http://demos.telerik.com/silverlight/default.aspx#TreeView/HierarchicalTemplate

    Please let me know if you encounter any other problems.

    Greetings,
    Tihomir Petkov
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top