# RadToolBar Object

The following table lists the most important methods of the **RadToolBar** client-side object:

> caution Client side changes are available on the server side after postback. You can use the [ClientChanges](https://www.telerik.com/products/aspnet-ajax/documentation/controls/toolbar/client-side-programming/accessing-client-changes-at-the-server) property to access them.

| Name                      | Parameters     | Return Type                                                                                                                                                             | Description                                                                                                                                                                                                                                                                                                                                                                                   |
| ------------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **trackChanges**          | none           | none                                                                                                                                                                    | Begins tracking changes to the toolbar items. Only changes to the items that occur between a call to **trackChanges** and **commitChanges** persist after a postback. (see **Example 1**)                                                                                                                                                                                                     |
| **commitChanges**         | none           | none                                                                                                                                                                    | Ends tracking changes to the toolbar items. Only changes to the items that occur between a call to **trackChanges** and **commitChanges** persist after a postback. (see **Example 1**)                                                                                                                                                                                                       |
| **findItemByText**        | string         | [RadToolBarItem](https://www.telerik.com/products/aspnet-ajax/documentation/controls/toolbar/client-side-programming/objects/radtoolbaritem-object)                     | Returns the first item in the toolbar with the specified text.                                                                                                                                                                                                                                                                                                                                |
| **findItemByAttribute**   | string, string | [RadToolBarItem](https://www.telerik.com/products/aspnet-ajax/documentation/controls/toolbar/client-side-programming/objects/radtoolbaritem-object)                     | Returns the first item in the toolbar with the custom attribute specified by the first parameter set to the value specified by the second parameter.                                                                                                                                                                                                                                          |
| **findItemByValue**       | string         | [RadToolBarItem](https://www.telerik.com/products/aspnet-ajax/documentation/controls/toolbar/client-side-programming/objects/radtoolbaritem-object)                     | Returns the first item in the toolbar with the specified value.                                                                                                                                                                                                                                                                                                                               |
| **get_attributes**        | none           | [Attributes](https://www.telerik.com/products/aspnet-ajax/documentation/controls/toolbar/client-side-programming/objects/attributes-object)                             | Returns the collection of custom attributes defined for the toolbar.                                                                                                                                                                                                                                                                                                                          |
| **get_items**             | none           | [RadToolBarItemCollection](https://www.telerik.com/products/aspnet-ajax/documentation/controls/toolbar/client-side-programming/objects/radtoolbaritemcollection-object) | Returns the collection of items in the toolbar (not including items in drop-down lists).                                                                                                                                                                                                                                                                                                      |
| **get_allItems**          | none           | Array of [RadToolBarItem](https://www.telerik.com/products/aspnet-ajax/documentation/controls/toolbar/client-side-programming/objects/radtoolbaritem-object)            | Returns an array containing all the items in the toolbar, including the items in drop-down lists. Items in drop-down lists appear immediately following their parent items.                                                                                                                                                                                                                   |
| **get_orientation**       | none           | integer                                                                                                                                                                 | Returns 0 if the toolbar is horizontal, 1 if it is vertical.                                                                                                                                                                                                                                                                                                                                  |
| **set_orientation**       | integer        | none                                                                                                                                                                    | Sets the orientation of the toolbar.                                                                                                                                                                                                                                                                                                                                                          |
| **get_expandAnimation**   | none           | [Animation](https://www.telerik.com/products/aspnet-ajax/documentation/controls/toolbar/client-side-programming/objects/animation-object)                               | Returns the expand animation object.                                                                                                                                                                                                                                                                                                                                                          |
| **get_collapseAnimation** | none           | [Animation](https://www.telerik.com/products/aspnet-ajax/documentation/controls/toolbar/client-side-programming/objects/animation-object)                               | Returns the collapse animation object.                                                                                                                                                                                                                                                                                                                                                        |
| **get_element**           | none           | HTML element                                                                                                                                                            | Gets the DOM element for the toolbar.                                                                                                                                                                                                                                                                                                                                                         |
| **get_childListElement**  | none           | HTML element                                                                                                                                                            | Gets the DOM element for the UL element that lists the toolbar buttons.                                                                                                                                                                                                                                                                                                                       |
| **add\_\<EventName>**     | eventHandler   | none                                                                                                                                                                    | Attaches an eventHandler to the event with the name \<EventName>. Note that client-side event names differ from their server-side counterparts. For more information, see [Client-Side Events](https://www.telerik.com/products/aspnet-ajax/documentation/controls/toolbar/client-side-programming/events/events).                                                                            |
| **remove\_\<EventName>**  | eventHandler   | Boolean                                                                                                                                                                 | Detaches an eventHandler from the event with the name \<EventName>.Returns "True" if the eventHandler is found and detached, false otherwise.Note that client-side event names differ from their server-side counterparts. For more information, see [Client-Side Events](https://www.telerik.com/products/aspnet-ajax/documentation/controls/toolbar/client-side-programming/events/events). |

> caption Example 1: Demonstrates the usage of trackChanges() and commitChanges() methods.

```JavaScript
var toolBar = $find("<%=RadToolBar1.ClientID %>");
var dropDownButton = toolBar.get_items().getItem(0);
toolBar.trackChanges();
var dropDownChildButton = new Telerik.Web.UI.RadToolBarButton();
dropDownChildButton.set_text("Added on the client-side button");
dropDownButton.get_buttons().add(dropDownChildButton);
toolBar.commitChanges();				
```
