0
onSelectRow: function (id) {
    var row = jQuery('#list').jqGrid('getRowData', lastSel)

    ...
    lastSel = id;
},

Specified in the [Docu]: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:methods it will not give the actuall value. What can I use instead? The eventually changed data is not submited.

Oleg
  • 220,925
  • 34
  • 403
  • 798
Adrian
  • 253
  • 2
  • 10

2 Answers2

1

You posted too few code. So it's unknown how you implemented inline editing. In any way you will have the value of the editing cell as the value of the corresponding HTML control. One uses typically <input> or <select> for editing. So to get the value you need find the corresponding HTML element and get directly its value. For example you can use

$("#" + rowid + ">td:nth-child(" + (i + 1) + ")>input").val()

to get the value from the input of the cell from the i-th column or the row having id equal to rowid.

The old answer demonstrate a little other way to do the same. In any way you have to get the value of the corresponding cell directly.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798
0
function getTextFromCell(cellNode) {
    return cellNode.childNodes[0].nodeName === "INPUT" ?
        cellNode.childNodes[0].value :
        cellNode.textContent || cellNode.innerText;
}

;

function getActualRowData(rowid) {
    var row = [];
    $('#' + rowid).find('td').each(function () {
       row.push(getTextFromCell(this));
    });
    return row;
}
Adrian
  • 253
  • 2
  • 10