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

RadMenu Not Populating Like It Used To

1 Answer 37 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Anthony
Top achievements
Rank 1
Anthony asked on 03 Dec 2009, 08:02 PM
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>

1 Answer, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 08 Dec 2009, 01:43 PM
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.
Tags
Menu
Asked by
Anthony
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Share this question
or