I have been playing around with the button with splitbutton enabled, trying to show a contextmenu.
having read articles on the subject none seem to do the trick, or atleast not the way i want it to.
setting the target element of contextmenu only applies when user right-clicks, and is catched on the whole button, not the splitbutton.
Using this script i get
"Unable to get value of the property 'relatedTarget': object is null or undefined"
How do i get the contextmenu to show on left-click on splitbutton only, and keep postback method on the main button?
having read articles on the subject none seem to do the trick, or atleast not the way i want it to.
setting the target element of contextmenu only applies when user right-clicks, and is catched on the whole button, not the splitbutton.
Using this script i get
"Unable to get value of the property 'relatedTarget': object is null or undefined"
function showMenu(e) { var contextMenu = $find("<%ctl00_phHead_pbCaseDetails_i0_i0_RadContextMenu1"); if ((!e.relatedTarget) || (!$telerik.isDescendantOrSelf(contextMenu.get_element(), e.relatedTarget))) { contextMenu.show(e); } $telerik.cancelRawEvent(e); }<telerik:RadButton ID="btnCaseSave" runat="server" EnableSplitButton="True" AutoPostBack="false" Skin="Windows7" Text="Spara" OnClientClicked="showMenu(event)"> </telerik:RadButton> <telerik:RadContextMenu ID="RadContextMenu1" runat="server" Skin="Windows7"> <Targets> <telerik:ContextMenuElementTarget ElementID="ctl00_phHead_pbCaseDetails_i0_i0_btnCaseSave" /> </Targets> <Items> <telerik:RadMenuItem Text="Spara och avsluta"> </telerik:RadMenuItem> </Items> </telerik:RadContextMenu> How do i get the contextmenu to show on left-click on splitbutton only, and keep postback method on the main button?