Adding/Removing Nodes of KetticTreeView in C#.NET
The nodes commands of KetticTreeView are placed in the button bar on the left panel of the property builder. These node commands allow us to add, remove, and arrange the nodes of the tree view structure. For example, we can easily add a new root node or a child node, as well as remove the selected node. At the same time, we can make the chosen child node a sibling of its parent and make the chosen node a child of the previous node in the list. Furthermore, we are able to move the selected node up and down in the list. The following C# tutorial demonstrates how to manipulate the nodes at run time.
C# Add Nodes to KetticTreeView control
The nodes of KetticTreeView are in a hierarchical structure. The KetticTreeView includes the Nodes.Add() method for the developers to create a node to the KetticTreeView. When we need to create a descendant of the node, we can use the parent nodes Nodes.Add() method. The following C# code snippet demonstrates how to add nodes to KetticTreeView.
If we need to cancel the node adding before it is added, we can use the NodeAdding event, which is fired before adding a node. When we shall cancel the added node, we can use the NodeAdded event, which is fired when the node is added successfully. The following C# code sample shows how to using the events.
C# Remove Nodes to KetticTreeView control
KetticTreeView contains the Remove() method to delete an individual node and the Nodes.Clear() method to delete the entire nodes at once. The C# code snippet below show how to use the two methods
If we need to cancel the node removing before it is deleted, we can use the NodeRemoving event, which is fired before removing a node. When we shall cancel the removed node, we can use the NodeRemoved event, which is fired when the node is removed successfully. The following C# code sample shows how to using the events.
|
UI Controlsfor Windows Forms .NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI DesignWinForms UI Controls WinForms Buttons UI Control WinForms Calendar UI ControlWinForms Carousel UI ControlWinForms Chart UI ControlWinForms Clock UI ControlCommandBar UI ControlWinForms Dock UI ControlDesktop Alert UI ControlDropDown List UI ControlWinForms Editor UI ControlForms and Dialogs UI ControlWinForms GridView UI ControlWinForms ListView UI ControlWinForms Menu UI ControlWinForms ComboBox UI ControlWinForms PageView UI ControlPanels and Labels UI ControlWinForms Panorama UI ControlWinForms PDFViewer UI ControlWinForms Property Grid UI ControlWinForms Ribbon UI ControlWinForms PivotGrid UI ControlWinForms RichTextBox UI ControlWinForms Rotator UI ControlWinForms Scheduler UI ControlWinForms Shortcuts UI ControlWinForms SpellChecker UI ControlWinForms Track & Status UI ControlWinForms TreeView UI ControlKeyboard SupportDesign Time SupportBuild PropertyContext MenuTreeView - NodeAdd & Remove NodesReorder NodesFormat NodesEdit NodesSelect NodesFilter NodesCustom Filter NodesSort NodesCustom Sort NodesFind Sort NodesData BindingBasicsDatabaseXML DataDrag and DropCustomizationContext MenuCustomizationAssign ScreenTipLocalizationWinForms Wizard UI ControlWinForms Test UI ControlWinForms Theme UI Control |