Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
Dialog editmode enter key closes the dialog in textarea & textarea height
posted

Hello.

I have a grid, inside there is a textfield and a multiline textarea, editmode set to dialog.

Now I want to achieve that when I press the enter key inside the textarea, it has to jump to a new line instead of closing the dialog.

I have tried a couple of workarounds, but none of them working.

I have tried this solution, but the Cancel button not working:

$("#grid").on("iggridupdatingeditrowending", function (evt, ui) {

    var mouseClickButton = evt.originalEvent.target.innerHTML;

    if (mouseClickButton.equals("Done") || mouseClickButton.equals("Cancel")) {
        return true;
    } else if (evt.originalEvent.which = 13) {
        // Focus the cuurent input field
        evt.originalEvent.currentTarget.focus();
    }
    ui.keepEditing = true;
    return false;
});

My another question is, how can I set the height of the textarea inside the dialog? I have tried a couple of javascript methods to change it's height, but without any luck.

I only want taller textarea inside the editdialog, not in the grid.

Can you help me with that please?

Thank you!

Best regards,

Dominik

  • 2525
    posted

    Hello Dominik,

    You can look into the solution provided in this forum thread on how to dispable esc/enter keys from propogating to igGridUpdating:

    http://es.infragistics.com/community/forums/t/79234.aspx