Hi,
I'm using the context menu in a Microsoft Grid. I want to hide different menu items depending on the current selected row. I have used a page method and a callback to determine which menu items to hide. The problem is that the menu (the first time after the page was loaded) is displayed with double line spacing. Next time the context menu is displayed, it appears with correct line spacing.
My sample code is as follows:
<telerik:RadContextMenu runat="server" ID="ctxMenu" OnClientShowing="showingContextMenu" >
I'm using the context menu in a Microsoft Grid. I want to hide different menu items depending on the current selected row. I have used a page method and a callback to determine which menu items to hide. The problem is that the menu (the first time after the page was loaded) is displayed with double line spacing. Next time the context menu is displayed, it appears with correct line spacing.
My sample code is as follows:
<telerik:RadContextMenu runat="server" ID="ctxMenu" OnClientShowing="showingContextMenu" >
function showingContextMenu(menu, args)
{
var target = args.get_targetElement();
if (target)
{
if (target.value == '')
args.set_cancel(true);
else
PageMethods.GetMenuItemsToHide(currentID, showMenuCallback);
}
}
function showMenuCallback(result)
{
var contextMenu = $find('FilterCtrl_ctxMenu');
for(var i=0; i < result.length; ++i)
{
contextMenu.findItemByValue(result[i]).hide();
}
$telerik.cancelRawEvent(event);
}