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).
I think that Aidan's answer is by far the best.
$('#yourgrid').jqGrid("editCell", 0, 0, false);
This commits any current edits, giving you access to the real value. I prefer it because:
- You don't have to hard-code any cell references in.
- It is particularly well suited to using getRowData() to get the entire grid, as it doesn't care which cell you've just been editing.
- You're not trying to parse some markup generated by jqGrid which may change in future.
- If the user is saving, then ending the edit session is likely the behaviour they would want anyway.