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.ControlsAssembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax public IList<ClientOperation<KaxMenuItem>> ClientChanges { get; }
Public ReadOnly Property ClientChanges As IList(Of ClientOperation(Of KaxMenuItem))
Get
public:
property IList<ClientOperation<KaxMenuItem^>^>^ ClientChanges {
IList<ClientOperation<KaxMenuItem^>^>^ get ();
}
member ClientChanges : IList<ClientOperation<KaxMenuItem>> with 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:
break;
case ClientOperationType.Remove:
break;
case ClientOperationType.Update:
UpdateClientOperation<KaxMenuItem> update = operation as UpdateClientOperation<KaxMenuItem>
break;
case ClientOperationType.Clear:
break;
}
}
For Each operation As ClientOperation(Of KaxMenuItem) In KaxToolBar1.ClientChanges
Dim item As KaxMenuItem = operation.Item
Select Case operation.Type
Case ClientOperationType.Insert
Exit Select
Case ClientOperationType.Remove
Exit Select
Case ClientOperationType.Update
Dim update As UpdateClientOperation(Of KaxMenuItem) = TryCast(operation, UpdateClientOperation(Of KaxMenuItem))
Exit Select
Case ClientOperationType.Clear
Exist Select
End Select
Next
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also