How to get a jqGrid cell value when editing

前端 未结 23 2621
日久生厌
日久生厌 2020-11-27 17:43

How to get a jqGrid cell value when in-line editing (getcell and getRowData returns the cell content and not the actuall value of the input element).

23条回答
  •  孤独总比滥情好
    2020-11-27 18:38

    General function to get value of cell with given row id and cell id

    Create in your js code function:

    function getCellValue(rowId, cellId) {
        var cell = jQuery('#' + rowId + '_' + cellId);        
        var val = cell.val();
        return val;
    }
    

    Example of use:

    var clientId = getCellValue(15, 'clientId');
    

    Dodgy, but works.

提交回复
热议问题