Click or drag to resize
KaxTreeViewClientChanges Property
Gets a list of all client-side changes (adding a node, removing a node, changing a node's property) which have occurred.

Namespace: Kettic.AspNet.Controls
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax
public IList<ClientOperation<KaxTreeNode>> ClientChanges { get; }

Property Value

Type: IListClientOperationKaxTreeNode
A list of ClientOperationT objects which represent all client-side changes the user has performed. By default the ClientChanges property returns empty list. Client-changes are recorded if and only if the client-side methods trackChanges()/commitChanges() have been invoked.
Remarks
You can use the ClientChanges property to respond to client-side modifications such as
  • adding a new item
  • removing existing item
  • clearing the children of an item or the control itself
  • changing a property of the item
The ClientChanges property is available in the first postback (ajax) request after the client-side modifications have taken place. After this moment the property will return empty list.
Examples
The following example demonstrates how to use the ClientChanges property
foreach (ClientOperation<KaxTreeNode> operation in KaxTreeView1.ClientChanges)
{
    KaxTreeNode node = operation.Item;

    switch (operation.Type)
    {
        case ClientOperationType.Insert:
            //A node has been inserted - operation.Item contains the inserted node
        break;
        case ClientOperationType.Remove:
            //A node has been inserted - operation.Item contains the removed node. 
         //Keep in mind the node has been removed from the treeview.
        break;
        case ClientOperationType.Update:
            UpdateClientOperation<KaxTreeNode> update = operation as UpdateClientOperation<KaxTreeNode>
            //The "UpdateOperation" provides an additional property "PropertyName". This is the property whose value was changed from the client side.
        break;
        case ClientOperationType.Clear:
            //All children of have been removed - operation.Item contains the parent node whose children have been removed. If operation.Item is null then the root nodes have been removed.
        break;
    }
}
See Also