Hi Saulo,
Thanks for using Syncfusion products.
Query: I'm having trouble using the controls
because the examples are all present in cshtml and I have to translate them
step by step. I'm trying to create a menu with a defined list, but I got stuck.
Can someone help with?
We can
achieve your requirement by modifying the “MenuFields”
property of Menu component. In this we need to give the “DataSource” as sub items of “MenuFields”
property using “Sub()” method.
Please refer
the following code snippet to use the menu control with “Datasource”.
[vbhtml]
@Html.EJ().Menu("menujson").MenuFields(Sub(menuf)
menuf.Datasource(ViewBag.datasource).Id("pid").Text("mtext").ParentId("parent").SpriteCssClass("sprite"))
|
For your convenience we have prepared a simple sample based
on your requirement. You can also download the attached sample from the
following location.
Sample Link: Menu-sample
In the above sample, we have used our Menu control for demo. If you still face any problems, please
revert back us with your sample and replication procedure. This
would be helpful for us to provide you the exact solution.
Please let us
know if you have any queries.
Regards,
Kaliswaran S