This is a migrated thread and some comments may be shown as answers.

Kendo Binding XML data to Menu

7 Answers 184 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Brandon
Top achievements
Rank 1
Brandon asked on 11 Jun 2014, 06:46 PM
I asked a question on stackoverflow about binding a xml data file to a Kendo UI Menu. 

http://stackoverflow.com/questions/23998479/binding-xml-data-to-kendo-ui-menu-dynamically

I was wondering if Kendo supports binding to a xml file dynamically. If so, could you also create multiple menus with hierarchy structures?


7 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 12 Jun 2014, 10:10 AM
Hi Brandon,

The Kendo UI Menu does not support data binding, so it is not possible to bind an XML service to the menu. You can manually create a data structure that you can pass to the menu, as shown in this example:

http://demos.telerik.com/kendo-ui/menu/images

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Brandon
Top achievements
Rank 1
answered on 12 Jun 2014, 01:38 PM
Thank you Kiril for the quick response! So, is there an alternative way which will allow me to create a menu dynamically?
0
Kiril Nikolov
Telerik team
answered on 13 Jun 2014, 07:14 AM
Hi Brandon,

As the menu does not support data binding there is no built-in solution to create such. If you check this demo you can see that the menu is initialized with JavaScript and not pure HTML, so if you parse your XML and create similar structure, then you might achieve something like dynamic menu creation.

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Ashok
Top achievements
Rank 1
answered on 22 Jan 2015, 01:18 PM
yes.... same problem i have.have got solution for that
0
Hemant
Top achievements
Rank 1
answered on 06 May 2015, 10:07 PM
Hi Ashok, what is the solution you have used? Please share.
0
Hemant
Top achievements
Rank 1
answered on 07 May 2015, 02:46 AM

Hi Nikolov

Can you please post a sample of how you would insert the data from the parsed XML into the dataSource that is inside the kendoMenu structure?

<script>
$("#menu-images").kendoMenu({
    dataSource: [

0
Kiril Nikolov
Telerik team
answered on 08 May 2015, 07:50 AM

Hello Hemant,

An example of using a dataSource in a Kendo UI Menu is available here:

http://docs.telerik.com/kendo-ui/api/javascript/ui/menu#configuration-dataSource

Please note that it only supports JavaScript array of object, and not XML.

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Menu
Asked by
Brandon
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Brandon
Top achievements
Rank 1
Ashok
Top achievements
Rank 1
Hemant
Top achievements
Rank 1
Share this question
or