RadzenMenu.Click(MenuItemEventArgs.Value) is broken #1672

Closed
opened 2026-01-29 17:57:05 +00:00 by claunia · 2 comments
Owner

Originally created by @JZO001 on GitHub (Mar 19, 2025).

Describe the bug
Issues with RadzerMenu.Click. RadzenMenu Click event has an eventArgs object called MenuItemEventArgs. It has moreover Text and Value properties. In the older versions on Radzen, Text contained the Text and the Value is an object, what I put in it. Now it has a bug, the Value has the same value as the Text and the original Value lost.

To Reproduce
Example:
foreach (Currency currency in CrossMediaVisionData.Currencies)
{
_currencyMenuItems.Add(new RadzenMenuItem()
{
Text = $"{currency.Name} ({currency.Abbreviation})",
Value = currency.Id,
Click = new EventCallbackFactory().Create(this, SelectCurrencyByMenuItemAsync)
});
}

Where the currency.Id is an integer, in my cases 0,1,2,3, etc....
My event handler method:

private async Task SelectCurrencyByMenuItemAsync(MenuItemEventArgs e)
{
    CrossMediaVisionData.SelectedCurrencyId = (int)e.Value;
}

Where the e.Value was an int some Radzen versions before, but now in 6.3.0 it is the Text value also, instead of the Currency.Id (int) value.

Expected behavior
MenuItemEventArgs.Value should be the same what I put in when I create the RadzenMenuItem

Screenshots

Desktop (please complete the following information):

  • OS: Win11
  • Browser: browser independent
  • Version: 6.3.0, 6.2.7 has tested, isssue are the same.

Additional context
Add any other context about the problem here.

Originally created by @JZO001 on GitHub (Mar 19, 2025). <!-- IMPORTANT: Read this first!!! 1. If you own a Radzen Professional or Еnterprise subscription you can report your issue or ask us a question via email at info@radzen.com. Radzen staff will reply within 24 hours (Professional) or 16 hours (Enterprise) 2. The Radzen staff guarantees a response to issues in this repo only to paid subscribers. 3. If you have a HOW TO question start a new forum thread in the Radzen Community forum: https://forum.radzen.com. Radzen staff will close issues that are HOWTO questions. 4. Please adhere to the issue template. Specify all the steps required to reproduce the issue or link a project which reproduces it easily (without requiring extra steps such as restoring a database). --> **Describe the bug** Issues with RadzerMenu.Click. RadzenMenu Click event has an eventArgs object called MenuItemEventArgs. It has moreover Text and Value properties. In the older versions on Radzen, Text contained the Text and the Value is an object, what I put in it. Now it has a bug, the Value has the same value as the Text and the original Value lost. **To Reproduce** Example: foreach (Currency currency in CrossMediaVisionData.Currencies) { _currencyMenuItems.Add(new RadzenMenuItem() { Text = $"{currency.Name} ({currency.Abbreviation})", Value = currency.Id, Click = new EventCallbackFactory().Create<MenuItemEventArgs>(this, SelectCurrencyByMenuItemAsync) }); } Where the currency.Id is an integer, in my cases 0,1,2,3, etc.... My event handler method: private async Task SelectCurrencyByMenuItemAsync(MenuItemEventArgs e) { CrossMediaVisionData.SelectedCurrencyId = (int)e.Value; } Where the e.Value was an int some Radzen versions before, but now in 6.3.0 it is the Text value also, instead of the Currency.Id (int) value. **Expected behavior** MenuItemEventArgs.Value should be the same what I put in when I create the RadzenMenuItem **Screenshots** **Desktop (please complete the following information):** - OS: Win11 - Browser: browser independent - Version: 6.3.0, 6.2.7 has tested, isssue are the same. **Additional context** Add any other context about the problem here.
Author
Owner

@enchev commented on GitHub (Mar 20, 2025):

There are no such changes. Let us know in which version worked differently, you can also check the history of the code for reference.

@enchev commented on GitHub (Mar 20, 2025): There are no such changes. Let us know in which version worked differently, you can also check the history of the code for reference.
Author
Owner

@enchev commented on GitHub (Mar 21, 2025):

Unable to replicate such problem - Value is assigned to the Click arguments as it should:

Image

Image

Image

@enchev commented on GitHub (Mar 21, 2025): Unable to replicate such problem - Value is assigned to the Click arguments as it should: ![Image](https://github.com/user-attachments/assets/1aee1f21-7a30-4af3-9863-c022448a73c2) ![Image](https://github.com/user-attachments/assets/04d227c9-0176-45a7-932a-3b801986804a) ![Image](https://github.com/user-attachments/assets/d2e4fda3-0f95-41a6-99c6-e5819bda7876)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1672