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 o开发者_运维技巧f 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.
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);
}
}
精彩评论