Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Treegrid addKeyPressHandler is not working in IE11 with Compatibility Mode Off

    I have added key press handler on a smartgwt Treegrid. My requirement is to provide user copy paste option of Treegrid items using keyboard shortcuts like (CTRL+C),(CTRL+V),But none of them are functioning with IE11 compatibility mode off.
    Same is working fine with IE8 and Chrome.
    Need help to resolve this issue.

    SC Version:- v10.0p_2015-03-05/Pro Deployment (2015-03-05)
    Below is the code block I am using which works fine in IE8:-
    TreeGrid clipboardGrid = new TreeGrid();
    clipboardGrid.setHeight100();
    clipboardGrid.setWidth100();
    clipboardGrid.setSelectionType(SelectionStyle.SINGLE);
    clipboardGrid.setCanFocus(true);
    addKeyPressHandler(new KeyPressHandler(){
    @Override
    public void onKeyPress(KeyPressEvent event) {
    if(event.isCtrlKeyDown() && event.getKeyName().equalsIgnoreCase("c"))
    {
    SC.showPrompt("Initiating Copy using Ctrl+C");
    setHilitedNodeIds(null);
    final FacilityTree tree = (FacilityTree)event.getSource();
    Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
    public void execute() {
    //Do Copy Working in IE8
    SC.clearPrompt();
    }
    });
    }

    }
    });

    SC Version:- v10.0p_2015-03-05/Pro Deployment (2015-03-05)

    #2
    Update to the latest patched build, make sure you are using the correct DOCTYPE.

    Do not attempt to change the Compatability Mode setting on the fly (this doesn't work correctly in IE) - instead, turn off Compatability Mode and restart all instances of the browser.

    Finally, if the problem persists, explain what's actually going wrong - is the event not firing? If your code for initiating a copy not working (because you don't seem to have posted any such code?).

    Comment

    Working...
    X