This is a migrated thread and some comments may be shown as answers.

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

2 Answers 44 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
James Reategui
Top achievements
Rank 1
James Reategui asked on 11 Dec 2009, 11:23 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Yana
Telerik team
answered on 15 Dec 2009, 01:53 PM
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.
0
James Reategui
Top achievements
Rank 1
answered on 15 Dec 2009, 07:20 PM
Yeah, the trick is canceling the postback for it to work right in IE.

Tags
TreeView
Asked by
James Reategui
Top achievements
Rank 1
Answers by
Yana
Telerik team
James Reategui
Top achievements
Rank 1
Share this question
or