RadControls for ASP.NET AJAX
Client side changes are available on the server side after postback. You can use the ClientChanges property of RadMenu to access them. The ClientChanges property of RadMenu returns a collection of objects of type ClientOperation. An operation has the following properties:
Item - the item which has been affected by the client operation;
Type - the type of the operation which is one of the following four cases:
Update - when a property is set on the the client through methods such as set_text(), set_value(), enable(), disable(), etc.: menuItem.disable();
Remove - when the remove client method is called: menu.get_items().remove(menuItem);
Insert - when the add client method is called: menu.get_items().add(menuItem);
Clear - when an item with child items calls the clear() method: parentItem.get_items().clear(). If the parent item has no child items the ClientChanges collection is not altered.
Note that you need to call the trackChanges() and commitChanges() client methods of RadMenu in order to be able to access the changes on the server via the ClientChanges property.
The code snippet below enumerates through all operations in the ClientChanges collection and utilizes both
the Item and Type properties. For a complete demo, please see the
client-side Add/Remove/Disable Items example.