# RadzenProfileMenuItem

**URL:** <https://forum.radzen.com/t/radzenprofilemenuitem/5900>\
**Category:** Radzen.Blazor Components\
**Created:** [December 3, 2020, 12:30pm UTC](https://forum.radzen.com/t/radzenprofilemenuitem/5900 "2020-12-03T12:30:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sukanzubair](https://forum.radzen.com/user_avatar/forum.radzen.com/sukanzubair/32/5278_2.png) [@Sukanzubair](https://forum.radzen.com/u/Sukanzubair)\
**Post date:** [December 3, 2020, 12:30pm UTC](https://forum.radzen.com/t/radzenprofilemenuitem/5900/1 "2020-12-03T12:30:46Z")

</div>

Hi,

How would i execute logic if a user selects a ProfileMenuItem. Example i would like to clear cache etc when the user selects the logout ProfileMenuItem.

Thanks

---

<div class="post-metadata">

**Author:** ![Sukanzubair](https://forum.radzen.com/user_avatar/forum.radzen.com/sukanzubair/32/5278_2.png) [@Sukanzubair](https://forum.radzen.com/u/Sukanzubair)\
**Post date:** [December 4, 2020, 6:22am UTC](https://forum.radzen.com/t/radzenprofilemenuitem/5900/2 "2020-12-04T06:22:38Z")

</div>

Hi Team, any idea how I can achieve this?

---

<div class="post-metadata">

**Author:** ![sys\_mike](https://forum.radzen.com/letter_avatar_proxy/v4/letter/s/eada6e/32.png) [@sys\_mike](https://forum.radzen.com/u/sys_mike)\
**Post date:** [January 20, 2022, 10:14pm UTC](https://forum.radzen.com/t/radzenprofilemenuitem/5900/3 "2022-01-20T22:14:39Z")

</div>

Hi,

I have the same question. I want to call a function, but @onclick is not working for me.

```auto
<RadzenProfileMenuItem Text="Logout" @onclick="Logout" Icon="logout" />

```

Do I need to add another child component?

Thanks,  
Mike

---

<div class="post-metadata">

**Author:** ![Sukanzubair](https://forum.radzen.com/user_avatar/forum.radzen.com/sukanzubair/32/5278_2.png) [@Sukanzubair](https://forum.radzen.com/u/Sukanzubair)\
**Post date:** [January 21, 2022, 5:51am UTC](https://forum.radzen.com/t/radzenprofilemenuitem/5900/4 "2022-01-21T05:51:24Z")

</div>

I added the onclick on the RadzenPanelMenu and in the method handler I checked the args text to determine which menu item was selected ( provided these names are unique)

protected async Task MenuPanelClick(MenuItemEventArgs args)  
{  
if (args == null || string.IsNullOrEmpty(args.Text) || !string.IsNullOrEmpty(args.Path))  
{  
return;  
}

```
        switch (args.Text)
        {
```

---

<div class="post-metadata">

**Author:** ![sys\_mike](https://forum.radzen.com/letter_avatar_proxy/v4/letter/s/eada6e/32.png) [@sys\_mike](https://forum.radzen.com/u/sys_mike)\
**Post date:** [January 22, 2022, 12:18am UTC](https://forum.radzen.com/t/radzenprofilemenuitem/5900/5 "2022-01-22T00:18:41Z")

</div>

Thanks for that solution. I'll try it out.

Maybe Radzen will have an easier way...

Mike

---

<div class="post-metadata">

**Author:** ![grwomack](https://forum.radzen.com/letter_avatar_proxy/v4/letter/g/9fc348/32.png) [@grwomack](https://forum.radzen.com/u/grwomack)\
**Post date:** [January 8, 2024, 5:41am UTC](https://forum.radzen.com/t/radzenprofilemenuitem/5900/6 "2024-01-08T05:41:57Z")

</div>

Hi,

Following up on this. Is it possible to add an OnClick handler to the RadzenProfileMenuItem? Is there anything that prevents this from being added or is it best to add it in our own forks?

Best,  
Garrett

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [January 8, 2024, 5:45am UTC](https://forum.radzen.com/t/radzenprofilemenuitem/5900/7 "2024-01-08T05:45:07Z")

</div>

Hey @grwomack,

RadzenProfileMenuItem will raise the RadzenProfileMenu Click event:

> <https://github.com/radzenhq/radzen-blazor/blob/master/Radzen.Blazor/RadzenProfileMenuItem.razor.cs#L93>
