I would like to open a page from the menu by passing it the number of the report it has to manage
But
Link="/rapportiselezione/{1}" doesn't work
Link="/rapportiselezione/" is OK
<SideBarMenu>
@*<AuthorizeView Roles="Operatore interno,Amministratore">
<Authorized>*@
<SideBarTreeView Icon="fas fa-user">
<Title>Menù</Title>
<Items>
<SideBarMenuItem Icon="fas fa-home" Link="/">
Home
</SideBarMenuItem>
<SideBarMenuItem Icon="fas fa-warehouse" Link="/magazzino/">
Magazzino
</SideBarMenuItem>
<SideBarMenuItem Icon="fas fa-warehouse" Link="/ordiniselezione/">
Ordini
</SideBarMenuItem>
<SideBarMenuItem Icon="fas fa-cookie-bite" Link="/bolleselezione/">
Ricevimenti
</SideBarMenuItem>
<SideBarTreeView Icon="fas fa-copy">
<Title>Rapporti</Title>
<Items>
<SideBarTreeView Icon="fas fa-copy">
<Title>Magazzino</Title>
<Items>
<SideBarMenuItem Icon="far fa-circle" Link="/rapportiselezione/{1}">
Movimenti per Articolo
</SideBarMenuItem>
<SideBarMenuItem Icon="far fa-circle" Link="/rapportiselezione/">
Seleziona Movimenti
</SideBarMenuItem>
<SideBarMenuItem Icon="far fa-circle" Link="/rapportiselezione/">
Totalizza Movimenti
</SideBarMenuItem>
</Items>
</SideBarTreeView>
<SideBarTreeView Icon="fas fa-copy">
<Title>Misure e Colori</Title>
<Items>
<SideBarMenuItem Icon="far fa-circle" Link="//">
Singolo Articolo Movimenti
</SideBarMenuItem>
<SideBarMenuItem Icon="far fa-circle" Link="//">
Singolo Articolo Ordini
</SideBarMenuItem>
</Items>
</SideBarTreeView>
</Items>
</SideBarTreeView>
</Items>
</SideBarTreeView>
</SideBarMenu>
Hi Arturo,
Thanks for contacting Syncfusion support.
We have checked your reported requirement, we would like to let you know that we have 'Url' property in Blazor 'Menu' component. And we can achieve your requirement by using this property. We have created simple Menu sample with Url property, and we have passed route parameter 'Text' with it. Please refer the below code example,
[Index.razor]
@page "/"
@using Syncfusion.Blazor.Navigations
@{ Text = "DataPassed"; UrlValue = "/counter/" + Text; } <SfMenu TValue="MenuItem"> <MenuItems> <MenuItem Text="File"> <MenuItems> <MenuItem Text="Counter" Url="@UrlValue"></MenuItem> <MenuItem Text="FetchData"></MenuItem> </MenuItems> </MenuItem> </MenuItems> </SfMenu>
@code { public string Text { get; set; } public string UrlValue { get; set; } } |
[Counter.razor]
@page "/counter/{Text}"
<h1>Counter</h1> @Text // You can get the 'Text' value which is passed from index.razor
@code { [Parameter] public string Text { get; set; } protected override void OnParametersSet() { base.OnParametersSet(); } } |
Also please refer the below UG link,
Menu: https://blazor.syncfusion.com/documentation/menu-bar/icons#navigation
For your reference we have prepared a sample,
Sample link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/SERVER_1-146001140-669475559
Could you please check the above sample and let us know whether is this fulfilling your requirement, if not please share us more information regarding this so that we can analyze based on that and provide you a better solution.
Regards,
Thaneegairaj S
problem solved
the correct string was simply
Link = "/ selection report / 1">
thanks anyway
Hi Arturo,
Thanks for the update.
We are happy to hear that your requirement has been fulfilled. Please feel free to contact us if you need any further assistance on this.
Regards,
Thaneegairaj S