RadzenProfileMenuItem

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

Hi Team, any idea how I can achieve this?

Hi,

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

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

Do I need to add another child component?

Thanks,
Mike

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)
        {

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

Maybe Radzen will have an easier way...

Mike

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

Hey @grwomack,

RadzenProfileMenuItem will raise the RadzenProfileMenu Click event: