New to Telerik UI for ASP.NET AJAX? Download free 30-day trial


The OnClientLoad client-side event occurs when the toolbar is first loaded and fully initialized on the client.

The event handler receives a single parameter: a reference to the client-side toolbar object.

You can use this event to perform your own initialization to the toolbar when it is loaded, or to save a reference to the toolbar in a global variable for reference from within your client-side code.

The following example illustrates the use of the OnClientLoad event handler for saving a reference to the client-side object:

<script type="text/javascript">
    var toolBar1;
    function storeToolBarClientObject(sender) {
        toolBar1 = sender;
    function utilizeToolBarClientObject() {

<telerik:RadToolBar RenderMode="Lightweight" ID="RadToolBar1" runat="server" Orientation="Horizontal" 
    <CollapseAnimation Duration="200" Type="OutQuint" />
        <telerik:RadToolBarButton Text="button1" runat="server">
        <telerik:RadToolBarDropDown Text="dropdown" runat="server">
                <telerik:RadToolBarButton Text="Button2" runat="server">

The technique illustrated here can be used when the toolbar is nested within another control, but the RadToolBar must be rendered only once. If RadToolBar is nested in a grid with more than one row, the method fails since there will be multiple instances of the rendered toolbar.

In this article