Click or drag to resize
KaxMenuClientChanges Property
Gets a list of all client-side changes (adding an item, removing an item, changing an item'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<KaxMenuItem>> ClientChanges { get; }

Property Value

Type: IListClientOperationKaxMenuItem
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<KaxMenuItem> operation in KaxToolBar1.ClientChanges)
{
    KaxMenuItem item = operation.Item;

    switch (operation.Type)
    {
        case ClientOperationType.Insert:
            //An item has been inserted - operation.Item contains the inserted item
        break;
        case ClientOperationType.Remove:
            //An item has been inserted - operation.Item contains the removed item. 
         //Keep in mind the item has been removed from the menu.
        break;
        case ClientOperationType.Update:
            UpdateClientOperation<KaxMenuItem> update = operation as UpdateClientOperation<KaxMenuItem>
            //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 item whose children have been removed. If operation.Item is null then the root items have been removed.
        break;
    }
}
See Also