2

I am using inline edit of jqgrid using Enter key. The problem is the enter key works fine if the control is on textbox. However if the user is entering some data in text area (my edit options include text area ) and presses enter, it is taken as carriage return instead of enter key and does not submits the row.

How do we submit the edt row in inline edit on press of Enter button for text area fields.

Anoop
  • 21
  • 2
  • In you use the `edittype:'textarea'` instead of default `edittype:'text'` then you probably has multiline data which user should be able modify. How the user will be able to enter the second line of the text if you want submit the row on "Enter"? – Oleg Jul 02 '11 at 18:11

1 Answers1

1

Finally i ws able to submit a row using DataEvent feature.

dataEvents: [{ type: 'keydown', fn: submitRowData} ]

var submitRowData = function(e) { 
    var key = e.charCode || e.keyCode;
    if (key == 13)//enter
    { 
    jQuery('#grid1').jqGrid('saveRow',globalSelId,true,null,
            successMsgHandler,null,null,null,saveErrHandler);
    }
}
Anoop
  • 11
  • 1