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

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

2 Answers 43 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Chris Yoker
Top achievements
Rank 1
Chris Yoker asked on 08 Oct 2009, 10:58 AM

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 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 13 Oct 2009, 07:52 AM
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.
0
Chris Yoker
Top achievements
Rank 1
answered on 13 Oct 2009, 11:51 PM
hiya,

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

yogi
Tags
Menu
Asked by
Chris Yoker
Top achievements
Rank 1
Answers by
Peter
Telerik team
Chris Yoker
Top achievements
Rank 1
Share this question
or