Project breaks when I use Q2 2009 radMenu instead of older version

3 posts, 0 answers
  1. Chris Yoker
    Chris Yoker avatar
    411 posts
    Member since:
    Jul 2005

    Posted 08 Oct 2009 Link to this post

    Hiya,

     

    Vs2008

    Q2 2009 SP1

     

    I have a dynamicData project.

    When I was using an old radMenu, the project worked fine.

    Now, with the new radMenu, I get an error.

     

    Old rad menu:

    oldRadMenu.DataSource = visibleTables; 
    oldRadMenu.DataBind(); 
     

    NEW radMenu:

    q2RadMenu.DataSource = visibleTables; 
    q2RadMenu.DataBind();  //Error:  
    //Object of type System.Web.DynamicData.MetaTable does not have a TableName property. 
     

    So, I have proved that the new menu errors when it is given the exact same dataSource as an old radMenu.

    The aspx is the same for both:

    <telerik:RadMenu ID="q2RadMenu" runat="server" DataTextField="TableName">   
    </telerik:RadMenu> 
     
    <radM:RadMenu ID="oldRadMenu" runat="server" DataTextField="TableName"
    </radM:RadMenu> 
     

    Please specify:

    1)    why the new menu breaks

    2)    What I need to do to fix it.

     

    I previously took the time to ask Telerik whether radMenu would work as-is with Dynamic Data, and was informed that it would.

     

    Thanks,

     

    yogi

  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 13 Oct 2009 Link to this post

    Hi Chris,

    Thank you for this question.
     
    In a dynamic data site, "visibleTables" is a collection of meta tables. In this case, RadMenu (both AJAX and classic) will automatically map the name of each element to the Text property of its items. In the classic menu, you will get the same result even if you remove the following setting: DataTextField="TableName". You can set DataTextField, DataNavigateUrlField, or other properties of this type to an existing property of the elements of the visibleTables collection. Please, see the attached screenshot for reference. 

    With this in mind, you can try setting:

    DataTextField="Name" (valid, though redundant)
    DataNavigateUrlField="ListActionPath" 

    I would say that it is an omission in the classic menu that no exception is thrown when attempting to set DataTextField to a non existing property.

    Let us know if you have additional questions.


    Greetings,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Chris Yoker
    Chris Yoker avatar
    411 posts
    Member since:
    Jul 2005

    Posted 13 Oct 2009 Link to this post

    hiya,

    Many thanks for the detailed investigation and reply.
    Problem solved.

    yogi
Back to Top