开发者

Jquery inline edit in jqgrid does not submit the data on press of Enter key if the control is on some text area

开发者 https://www.devze.com 2023-03-16 17:51 出处:网络
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

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);
    }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消