Reputation: 21
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.
Upvotes: 2
Views: 2503
Reputation: 11
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);
}
}
Upvotes: 1