property Fields on SfMenu is internal
3 Replies
1 reply marked as answer
GK
Gayathri KarunaiAnandam
Syncfusion Team
April 19, 2021 04:31 PM UTC
Hi Chino,
We have checked your reported query. We would like to let you know that we have deprecated the Fields property. We can set fields to Menu bar by using the MenuFieldSettings tag directive as demonstrated in the below code snippet. Please check the below code snippet
|
@using Syncfusion.Blazor.Navigations
<SfMenu TValue="DataList" Items="@MenuItems" @ref="MenuObj">
<MenuFieldSettings Text="Data" Children="SubDatas"></MenuFieldSettings>
</SfMenu>
@code{
SfMenu<DataList> MenuObj;
public List<DataList> MenuItems = new List<DataList>
{
new DataList{ Data = "Company", SubDatas = new List<DataList>{
new DataList{ Data= "Overview" },
new DataList{ Data= "About" },
new DataList{ Data= "Careers" }}
},
new DataList{ Data = "Services", SubDatas = new List<DataList>{
new DataList{ Data= "Consulting" },
new DataList{ Data= "Education" },
new DataList{ Data= "Health" }}
},
new DataList{ Data = "Products", SubDatas = new List<DataList>{
new DataList{ Data = "Hardware" },
new DataList{ Data = "Software" }}
},
new DataList{ Data = "Contact Us" }
}; public class DataList
{
public string Data { get; set; }
public List<DataList> SubDatas { get; set; }
}
public MenuFieldSettings MenuFields = new MenuFieldSettings()
{
Text = new string[] { "Continent", "Country", "Language" },
Children = new string[] { "Countries", "Languages" }
};
} |
For your reference, we have prepared a sample based on this scenario. Please check the below link.
Please get back to us, if you need further assistance.
Regards,
Gayathri K
Marked as answer
SP
Steve Powell
June 18, 2021 09:36 PM UTC
The documentation updated on 21-06-11 clearly shows the presence of the "Fields" attribute. Please update the documentation so it aligns with the package.
Thanks,
https://blazor.syncfusion.com/documentation/menu-bar/data-source-binding-and-custom-menu-items/
AS
Aravinthan Seetharaman
Syncfusion Team
June 21, 2021 12:40 PM UTC
Greetings from Syncfusion support.
We have checked your query. We are currently improving our documentation section, and it will be refreshed in any of our upcoming release. We appreciate your patience until then.
Regards,
Aravinthan S
SIGN IN To post a reply.