treeNode.startEdit() JS not working in IE8 with AjaxManager

3 posts, 1 answers
  1. James Reategui
    James Reategui avatar
    12 posts
    Member since:
    Oct 2008

    Posted 11 Dec 2009 Link to this post

    BTW this works fine in Firefox but not in IE7 or 8.

    I have a TreeView with ContextMenu's that call the following JS:
    function onClientContextMenuItemClicking(sender, args) { 
            var menuItem = args.get_menuItem(); 
            var treeNode = args.get_node(); 
            menuItem.get_menu().hide(); 
            switch (menuItem.get_value()) { 
                case "rename": 
                    treeNode.startEdit(); 
                    break; 
            } 
        } 

    I also have a RadAjaxManager so that this treeview triggers another panel:
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadTreeViewDockets"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="PanelViewArea" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 

    In IE8, when I hit the Rename Context menu, for an instant the node appears editable but then it immediately looses focus and is not editable. I also tried wrapping both the TreeView and the other Panel in a RadAjaxPanel but had the same result.

    Not sure if this is a bug or if there is a workaround.. Thanks!





  2. Answer
    Yana
    Admin
    Yana avatar
    5031 posts

    Posted 15 Dec 2009 Link to this post

    Hello James,

    Please try also to cancel the postback:

    function onClientContextMenuItemClicking(sender, args) {
                var menuItem = args.get_menuItem();
                args.set_cancel(true);
                var treeNode = args.get_node();
                menuItem.get_menu().hide();
                switch (menuItem.get_value()) {
                    case "rename":
                        treeNode.startEdit();
                        break;
                }
            }

    and let us know how it goes.


    Kind regards,
    Yana
    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.
  3. James Reategui
    James Reategui avatar
    12 posts
    Member since:
    Oct 2008

    Posted 15 Dec 2009 Link to this post

    Yeah, the trick is canceling the postback for it to work right in IE.

Back to Top