# DropDownButton Events

The DropDownButton exposes events that you can use to respond to user actions within the application:

* [OnClick](https://www.telerik.com/blazor-ui/documentation/components/dropdownbutton/events#onclick)
* [OnClose](https://www.telerik.com/blazor-ui/documentation/components/dropdownbutton/events#onclose)
* [OnOpen](https://www.telerik.com/blazor-ui/documentation/components/dropdownbutton/events#onopen)

## OnClick

The `OnClick` event fires when the user clicks or taps the primary button or a secondary button. The primary `<TelerikDropDownButton>` and each of its `<DropDownButtonItem>` instances execute a separate `OnClick` handler.

The event argument type is [`MouseEventArgs`](https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.components.web.mouseeventargs).

The event handler can be synchronous (`void`) or asynchronous (`async Task`).

## OnClose

The `OnClose` event fires before the DropDownButton popup closes. Set the `IsCancelled` property of the `DropDownButtonCloseEventArgs` argument to `true` to keep the popup open.

The event fires for user interaction and when calling `CloseAsync()`. It does not fire when the popup is already closed.

## OnOpen

The `OnOpen` event fires before the DropDownButton popup opens. Set the `IsCancelled` property of the `DropDownButtonOpenEventArgs` argument to `true` to keep the popup closed.

The event fires for user interaction and when calling `OpenAsync()`. It does not fire when the popup is already open.

## Example

> caption Handling the DropDownButton events

<demo metaUrl="client/dropdownbutton/events/" height="300"></demo>

## See Also

* [DropDownButton API](https://www.telerik.com/blazor-ui/documentation/api/telerik.blazor.components.telerikdropdownbutton)
* [Live Demo: DropDownButton](https://demos.telerik.com/blazor-ui/dropdownbutton/overview)
