Sub Menu Items Generated from Database

6 posts, 0 answers
  1. grant
    grant avatar
    7 posts
    Member since:
    May 2008

    Posted 01 Jul 2008 Link to this post

    Wondering how I can generate multi layerd sub menu items from data.  I have managed to get the first level sub menu to generate from the initial parent, but how can I generate children of the sub menu items?  I am using vb and this is the current code I have:

    'Where To Stay

    parentItem = radMenu.Items(1)

    For Each row As DataRow In dt.Rows

    childItem =

    New RadMenuItem

    childItem.Text = row(

    "Name").ToString

    childItem.NavigateUrl =

    "~/AtlanticPortal/en/WhereToStay.aspx?Region=" & row("ID").ToString & "&Community=0&Category=0&ProvID=" & Session("ProvID").ToString & "&RegionName=" & row("Name").ToString

    parentItem.Items.Add(childItem)

    Next

    I can get the sum benus to generate in relation to any of the 9 main menu items (parentItem = radMenu.Items(1)), but the sub menu items do not follow the same numbering...  I need the menu items to be generated from a data source as children of a child of menu item1 if that makes any sense.

  2. Dave Navarro
    Dave Navarro avatar
    150 posts
    Member since:
    Jul 2005

    Posted 23 Jul 2008 Link to this post

    Hello Grant,

    I was wondering if you ever resolved this issue?

    I've written code for this kind of scenario and thought I'd pass some along if you still need some help.

    Let me know,

    Dave
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. grant
    grant avatar
    7 posts
    Member since:
    May 2008

    Posted 23 Jul 2008 Link to this post

    Thanks David, I have a work around that Im not happy with.  I basically made the first two levels of the menu static and generated the third level from data.

    Id love to see your solution.
  5. Dave Navarro
    Dave Navarro avatar
    150 posts
    Member since:
    Jul 2005

    Posted 23 Jul 2008 Link to this post

    Ok,

    I've got a few things going on today but I'll put something together and post it here asap.

    Talk to you again soon,

    Dave
  6. grant
    grant avatar
    7 posts
    Member since:
    May 2008

    Posted 16 Oct 2008 Link to this post

    David, have you been able to come up with a solution here?
  7. Dave Navarro
    Dave Navarro avatar
    150 posts
    Member since:
    Jul 2005

    Posted 16 Oct 2008 Link to this post

    Hello Grant,

    Sorry for dropping off the map. I'd like to say that work can be unpredictable at times but it seems the reality is that it's unpredictable most of the time. But that's ok, sleep is over rated anyway.

    I'm going to write up an explanation of my code and I'd like to send you some screen shots of the menu but we are not permitted to attach files. Would you please send me your email address and I'll send you some screen shots to go along with my explanation?

    I'll put a reply here as well but I'll send you the screen shots.

    Thanks!

    Dave

    Dave@OfficeAutomatedSystems.Com

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017