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


The Drawer for ASP.NET MVC exposes the Show, Hide, and ItemClick events that you can handle to customize the functions of the component.

For a complete example on basic Drawer events, refer to the demo on using the events of the Drawer. More details about the Drawer events are available in the Drawer API.

The next example shows how to use the ItemClick() event to display the content in the selected Drawer item. To hide the content for the items that aren't currently selected, you will apply the hidden CSS style.

    @using Kendo.Mvc.UI

                <li data-role='drawer-item' class='k-selected'><span class='k-icon k-i-inbox'></span><span class='k-item-text' data-id='Inbox'>Inbox</span></li>
                <li data-role='drawer-separator'></li>
                <li data-role='drawer-item'><span class='k-icon k-i-notification k-i-bell'></span><span class='k-item-text' data-id='Notifications'>Notifications</span></li>
                <li data-role='drawer-item'><span class='k-icon k-i-calendar'></span><span class='k-item-text' data-id='Calendar'>Calendar</span></li>
                <li data-role='drawer-separator'></li>
                <li data-role='drawer-item'><span class='k-icon k-i-star-outline k-i-bookmark-outline'></span><span class='k-item-text' data-id='Favorites'>Favorites</span></li>
                <li data-role='drawer-separator'></li>
            <div id='drawer-content'>
                <div id='Inbox' >
                    <p>You're all caught up.</p>
                <div id='Notifications' class='hidden'>
                    <p>You don't have any notifications.</p>
                <div id='Calendar' class='hidden'>
                    <p>Nothing scheduled for today.</p>

                <div id='Favorites' class='hidden'>
                    <p>Your favorites will appear here.</p>                    
        .Events(x => x.ItemClick("onItemClick")))

        function onItemClick(e) {
                e.sender.drawerContainer.find("#drawer-content > div").addClass("hidden");
                e.sender.drawerContainer.find("#drawer-content").find("#" + e.item.find(".k-item-text").attr("data-id")).removeClass("hidden");

        .hidden {
            display: none;

Next Steps

See Also

In this article