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




    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; 

    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">   
    <radM:RadMenu ID="oldRadMenu" runat="server" DataTextField="TableName"

    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.





  2. Peter
    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)

    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.

    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


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

Back to Top