I am using a RadContextMenu and RadGrid in combiation. The RadContextMenu is showing possible actions for a row in the RadGrid. Some of the actions are loading using a WCF service.
After upgrading to .NET 4.0 this has stopped working.
Using Firebug I can see that the RadContextMenu is getting the extra actions from the WCF service and the menu that appears is sized as if there is something to display, but its all blank and nothing happens when I click in it.
I am using VS2010, IIS7, the latest Telerik version, ASP.NET 4.0.
Hope someone can offer some help.
Regards
Thomas
My menu:
<telerik:RadContextMenu ID="rcmLines" runat="server" OnItemClick="rcmLines_ItemClick" >
<WebServiceSettings Path="~/BudgetServices.svc" Method="GetEntryAccountMenuItems" />
<Items>
<telerik:RadMenuItem Text="Ignore" Value="I" />
<telerik:RadMenuItem Text="Locate pair" Value="P" />
<telerik:RadMenuItem Text="Set entry account" ExpandMode="WebService" >
<GroupSettings Height="300px" />
</telerik:RadMenuItem>
</Items>
</telerik:RadContextMenu>
The JavaScript invoked from the RadGrid:
function PopLineMenu(sender, eventArgs) {
var menu = $find("<%= rcmLines.ClientID %>");
var evt = eventArgs.get_domEvent();
if (evt.target.tagName == "INPUT" || evt.target.tagName == "A") {
return;
}
var index = eventArgs.get_itemIndexHierarchical();
document.getElementById("lineIndex").value = index;
sender.get_masterTableView().selectItem(sender.get_masterTableView().get_dataItems()[index].get_element(), true);
menu.show(evt);
evt.cancelBubble = true;
evt.returnValue = false;
if (evt.stopPropagation) {
evt.stopPropagation();
evt.preventDefault();
}
}
The method being called:
[OperationContract]
public RadMenuItemData[] GetEntryAccountMenuItems() {
var list = AppContext.DefaultAccountPlan.NonSumEntryAccounts;
var array = list.ConvertAll(x => new RadMenuItemData {Text = x.NameAndNumber, Value = "Id:"+x.Id}).ToArray();
return array;
}