Intersoft ClientUI Documentation
IsEditable Property (UXTreeView)



Gets or sets a value indicating whether the value can be manually edited by the end-user.
Syntax
<CategoryAttribute("Common Properties")>
Public Property IsEditable As Boolean
Dim instance As UXTreeView
Dim value As Boolean
 
instance.IsEditable = value
 
value = instance.IsEditable
[CategoryAttribute("Common Properties")]
public bool IsEditable {get; set;}
[CategoryAttribute("Common Properties")]
public:
property bool IsEditable {
   bool get();
   void set (    bool value);
}
Remarks

UXTreeView features built-in editing capability which can be easily enabled by setting the IsEditable property to true. When enabled, users can press the F2 key on the selected item to activate editing mode. By default, UXTextBox control will be used as the editing control.

If you prefer, you can also customize the editing control to use more advanced editing controls such as UXNumericUpDown by customizing the ItemEditTemplate property. To show the edited text/value properly, you must bind the property to the control you defined in the ItemEditTemplate property.

Example

The following code shows how to enable node editing in UXTreeView.

XAML
Copy Code
<Grid>
    <Intersoft:UXTreeView IsEditable="True">
        <Intersoft:UXTreeViewItem Header="Folder 1">
            <Intersoft:UXTreeViewItem Header="File 1" />
        </Intersoft:UXTreeViewItem>
        <Intersoft:UXTreeViewItem Header="Folder 2" />
    </Intersoft:UXTreeView>
</Grid>

The following code shows how to customize the editing controls in UXTreeView by setting a custom data template to the ItemEditTemplate.

XAML
Copy Code
<Grid>
    <Intersoft:UXTreeView x:Name="EmployeeTrees" TreeSelectionMode="Multiple" ItemsSource="{Binding Employees}" 
                             DisplayMemberPath="Name" CollectionMemberPath="Employees" IsEditable="True">
        <Intersoft:UXTreeView.ItemEditTemplate>
            <DataTemplate>
                <StackPanel Orientation="Horizontal">
                    <Intersoft:UXTextBox Text="{Binding Name, Mode=TwoWay}" />
                    <TextBlock Text="|" />
                    <Intersoft:UXTextBox Text="{Binding Age, Mode=TwoWay}" />
                </StackPanel>
            </DataTemplate>
        </Intersoft:UXTreeView.ItemEditTemplate>
        <Intersoft:UXTreeView.ItemContainerStyle>
            <Style TargetType="Intersoft:UXTreeViewItem">
                <Setter Property="CollectionMemberPath" Value="Employees" />
                <Setter Property="DisplayMemberPath" Value="Name" />
            </Style>
        </Intersoft:UXTreeView.ItemContainerStyle>
    </Intersoft:UXTreeView>
</Grid>
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

UXTreeView Class
UXTreeView Members

Send Feedback