RadzenPanelMenuItem - Path with C# code #652

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

Originally created by @Andrey-2021 on GitHub (Nov 25, 2022).

Hi!
Please
add the ability to insert code into the Path,
for example

`<RadzenPanelMenuItem Text="@item.menu"

                     Path="Products/AllProducts?ProductType=@item.menu" 
                     Icon="save"
                     class="rz-background-color-danger-lighter">`

Thanks!

Originally created by @Andrey-2021 on GitHub (Nov 25, 2022). Hi! Please add the ability to insert code into the Path, for example `<RadzenPanelMenuItem Text="@item.menu" Path="Products/AllProducts?ProductType=@item.menu" Icon="save" class="rz-background-color-danger-lighter">` Thanks!
Author
Owner

@akorchev commented on GitHub (Nov 25, 2022):

This is a limitation of Blazor. It does not allow you to set properties like that. Using C# interpolation is a viable workaround:

Path=@($"Products/AllProducts?ProductType={item.menu}" )
@akorchev commented on GitHub (Nov 25, 2022): This is a limitation of Blazor. It does not allow you to set properties like that. Using C# interpolation is a viable workaround: ``` Path=@($"Products/AllProducts?ProductType={item.menu}" ) ```
Author
Owner

@Andrey-2021 commented on GitHub (Nov 25, 2022):

Thank you very much!
Please insert this example into the documentation
RadzenPanelMenuItem

@Andrey-2021 commented on GitHub (Nov 25, 2022): Thank you very much! Please insert this example into the documentation RadzenPanelMenuItem
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#652