Treeview extended with textbox at top

4 posts, 0 answers
  1. GJ
    GJ avatar
    4 posts
    Member since:
    Aug 2015

    Posted 28 Apr Link to this post

    Hello, i want to extend functionality of the treeview with a textbox at top for search funtions. I'm trying to make with code similar to this (see below) but Treeview don't have "Item" like TextBox to get the instance. How can i get this functionality?

    private static void AddIconToTextBoxElement(RadTextBoxElement textElement, ImagePrimitive icon)

    {

        var item = textElement.TextBoxItem;

        textElement.Children.Remove(item);

        icon.SetValue(DockLayoutPanel.DockProperty, Telerik.WinControls.Layouts.Dock.Left);

        var dockPanel = new DockLayoutPanel

        {

            LastChildFill = true

        };     

        dockPanel.Children.Add(icon);

        dockPanel.Children.Add(item);

        textElement.Children.Add(dockPanel);

    }

  2. Dess
    Admin
    Dess avatar
    2107 posts

    Posted 01 May Link to this post

    Hello Jorge, 

    Thank you for writing.  

    I would recommend you to create a UserControl that contains a RadTextBox docked to the top and a RadTreeView below the text box. Thus, you can achieve the desired layout and implement the custom search functionality that you want.

    I hope this information helps. Should you have further questions I would be glad to help.

    Regards,
    Dess
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Bruce
    Bruce avatar
    25 posts
    Member since:
    May 2017

    Posted 21 Jul Link to this post

    I know this post is several months old, but for others searching for a solution, here is a KB article that explains how to do what you user wanted, and an example control that will work out of the box. 

    http://www.telerik.com/support/kb/winforms/details/search-box
  4. Dess
    Admin
    Dess avatar
    2107 posts

    Posted 24 Jul Link to this post

    Hello Bruce, 

    Thank you for writing.  

    The referred KB article is greatly appreciated. It may be suitable for some custom search scenarios in RadTreeView. I have updated your Telerik points for the community effort.

    I hope this information helps. Should you have further questions I would be glad to help.

    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top