Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Can I Make a TreeViewItem with Two Editable Textboxes?
posted

Hi,

Straight from WPF, I use an adorner to allow editing of the underlying text on each TreeViewItem. it's painful, so I would like to know if you can do this 'out of the box' with an Infragistic control?

Simply, I need two vertical TextBlocks (change to TextBoxes when clicked) that are in a TreeViewiIem that can be edited, one at a time. Focus lost should move to the next TreeViewItem, if possible.

Thanks for any help, Loz.

Parents
No Data
Reply
  • 34430
    Offline posted

    Hello LozCool,

    There is an Infragistics control that can help you to achieve this called the XamDataTree, which you can read about here: https://www.infragistics.com/help/wpf/xamdatatree.

    The XamDataTree control allows editing out-of-the-box, and each of the NodeLayout elements for your XamDataTree have both an ItemTemplate and an EditorTemplate that you can use to configure the display and the editor for the nodes in your tree. If you set the ItemTemplate to be a DataTemplate with your two TextBlocks and your EditorTemplate to be a DataTemplate with your two TextBoxes, you can create this behavior that you are looking to achieve. You can read further about node editing in the XamDataTree at the following documentation article, where the EditorTemplate is also covered: https://www.infragistics.com/help/wpf/xamdatatree-xamdatatree-editing.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer

Children
No Data