All Products
Demos
Pricing
Services
Blogs
Docs & Support
Search
Shopping cart
Login
Contact Us
Get A Free Trial
close mobile menu
Telerik Forums
/
UI for ASP.NET AJAX Forum
/
Menu
/
RadMenu Not Populating Like It Used To
Cancel
Telerik UI for ASP.NET AJAX
Resources
Buy
Try
Feed for this thread
2 posts, 0 answers
Anthony
3 posts
Member since:
Apr 2008
Posted 03 Dec 2009
Link to this post
I have been using the proscribed method of populating a RadMenu via a web service. It used to work correctly when we were using the 2007 Q3 version. We recently upgraded to the 2009 Q3 version of the Telerik controls and now this functionality doesn't work. It calls the web service, the web service runs successfully, but nothing is ever returned. Neither of the client functions for post item populating fire. Not sure what is going on. Any help is greatly appreciated. I've included the code below.
[WebMethod(EnableSession = true)]
public RadMenuItemData[] GetMenuColumns(RadMenuItemData item, object context)
{
SqlConnection sCon = new SqlConnection(ConfigurationManager.ConnectionStrings["Soleran"].ConnectionString);
IDictionary<string, object> contextDictionary = (IDictionary<string, object>)context;
List<RadMenuItemData> result = new List<RadMenuItemData>();
SqlDataAdapter adap = new SqlDataAdapter(QueryParse(contextDictionary["query"].ToString()),sCon);
DataTable dt = new DataTable();
adap.Fill(dt);
foreach(DataColumn dc in dt.Columns)
{
RadMenuItemData itemData = new RadMenuItemData();
itemData.Text = dc.ColumnName.ToString();
itemData.Value = dc.ColumnName.ToString() + '·' + dc.DataType.ToString() + '·' + dc.Ordinal.ToString();
result.Add(itemData);
}
return result.ToArray();
}
<telerik:RadContextMenu id="rcmSummary" runat="server" EnableAutoScroll="True" OnItemClick="AddSumClick" OnClientItemPopulationFailed="itemPopulatedFailed" OnClientItemPopulated="itemPopulated" OnClientItemPopulating="itemPopulating">
<WebServiceSettings Path="Summary.asmx" Method="GetMenuColumns" />
<LoadingStatusTemplate>
Loading...
</LoadingStatusTemplate>
<CollapseAnimation Duration="200" Type="OutQuint" />
<Items>
<telerik:RadMenuItem runat="server" Text="Available Columns" ExpandMode="WebService">
</telerik:RadMenuItem>
</Items>
</telerik:RadContextMenu>
Veselin Vasilev
Admin
2992 posts
Posted 08 Dec 2009
Link to this post
Hi Anthony,
The code seems to be similar as in our
online demo
where everything is working normally.
I suggest that you send us a sample project in a new support ticket.
Regards,
Veselin Vasilev
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.
Back to Top
Close