Intersoft ClientUI Documentation
IsEditable Property
See Also  Send Feedback
Intersoft.Client.UI.Aqua.UXCollection Namespace > UXTreeViewItem Class : IsEditable Property






Gets or sets a value that determines whether the item could be edit or not.

Syntax

Visual Basic (Declaration) 
<CategoryAttribute("Common Properties")>
Public Property IsEditable As Boolean
Visual Basic (Usage)Copy Code
Dim instance As UXTreeViewItem
Dim value As Boolean
 
instance.IsEditable = value
 
value = instance.IsEditable
C# 
[CategoryAttribute("Common Properties")]
public bool IsEditable {get; set;}
Delphi 
public read-write property IsEditable: Boolean; 
JScript 
CategoryAttribute("Common Properties")
public function get,set IsEditable : boolean
Managed Extensions for C++ 
[CategoryAttribute("Common Properties")]
public: __property bool get_IsEditable();
public: __property void set_IsEditable( 
   bool value
);
C++/CLI 
[CategoryAttribute("Common Properties")]
public:
property bool IsEditable {
   bool get();
   void set (    bool value);
}

Example

he 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>

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.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.