Greetings!
I'm using the demo of the basic Split Button's functionality as found in https://demos.telerik.com/aspnet-ajax/button/examples/splitbutton/defaultvb.aspx as the basis of my solutin / question.
I have a need for the right edge of the ContextMenu to be in line with the right edge of the SplitButton. My ContextMenu items are being loaded dynamically depending on certain conditions of the state of the form.
I have tried the following adaptation of the display function:
function btnWFlowSplitClicked(sender, args) { if (args.IsSplitButtonClick() || !sender.get_commandName()) { var currentLocation = $telerik.getBounds(sender.get_element()); var contextMenu = $find("<%= ctxWFlowSplit.ClientID %>"); var ctxSize = $telerik.getBounds(contextMenu.get_element()); //alert('split x:' + currentLocation.x + ' w:' + currentLocation.width); //alert('ctx w:' + ctxSize.width); var ctx_x = ctxSize.width - (currentLocation.x + currentLocation.width); //alert('ctx_x:' + ctx_x); contextMenu.showAt(ctx_x, currentLocation.y + currentLocation.height); }}
... but the value "ctxSize.width" keeps being set to 0 , which makes the context menu x position equal to a negative number, and unusable!
Does anyone have any ideas?
Thanks in advance
