Click here to Skip to main content
15,912,665 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using asp.net menu control.
i am not able to add more than 1 child menu item to parent item. i am able to get
from database but can't able display in parent menu.

i am using for loop code

my code is;-


C#
           var g = json.st.length;

           alert("displaying values: " + g);

           var menu = new dhtmlXMenuObject("menuObj");

           menu.attachEvent("onTouch", menuTouch);


           {

               for (i = ((json.st.length) - 1); i >= 0; i--) {

                   alert("displayed data: " + json.st);

                   menu.addNewSibling(null, "a", json.st[i], false);



                   {

                      // if (json.r.length == 0)

                       {
                           // foreach (menu.addNewChild)


                          // foreach(menu.addNewChild)

                           {

                               menu.addNewChild("a", 0, "new", json.r[i], false);

                           }

                       }

                       alert("displaying data: " + json.r);
                   }
what i have use for displaying child item 


 
 Pls. give the for loop to add the every child item to its parent item

 i am getting struggle last two days...?


Thanks you
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900