We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Error in Sidebar

Hi team, 

I'm getting this error using the sidebar. 



Here is my code.





I need the  item source (items) coming from the list because the menu source is dynamic (API) from the project I'm working on.


I also attached the sample source code with the error. 


Hoping for further response,


Best regards,

Tyrone


Attachment: SidebarMenu_bf6e319.rar

3 Replies

YA YuvanShankar Arunagiri Syncfusion Team October 20, 2022 06:59 AM

Hi Tyrone,


We have checked your reported query and found a two issue in your provided sample.

  1. In your provided sample, you don’t not refer the script file. So please add the below line in your project and refer the UG link for script reference.


UG link: https://blazor.syncfusion.com/documentation/common/adding-script-references


[_Host.cshtml]:

<script src="_content/Syncfusion.Blazor/scripts/syncfusion-blazor.min.js" type="text/javascript"></script>


        2.MenuFieldSettings tag must write inside the SfMenu tag, then only it will render properly.


[NavMenu.razor]:

<SfMenu CssClass="dock-menu" Items="@MenuItems" Orientation="@VerOrientation">

                            <MenuFieldSettings ItemId="Id" Text="Text" ParentId="ParentId" Url="Url" IconCss="IconCss"></MenuFieldSettings>

                        </SfMenu>


Please ensure above two points and get back to us, if you need any further assistance on this.


Regards, 

YuvanShankar A


Attachment: SidebarMenu_ef7dc969.zip


TY Tyrone November 1, 2022 09:16 AM

Hi  YuvanShankar A, It worked. thanks alot



YA YuvanShankar Arunagiri Syncfusion Team November 2, 2022 03:15 AM

We are happy to hear that your requirement has been fulfilled. Please get back to us if you need any other assistance.


If that post is helpful, please consider accepting it as the solution so that other members can locate it more quickly.


Loader.
Live Chat Icon For mobile
Up arrow icon