It is possible to use the getRowData method to retrieve the current of a cell but this retrieves the current cell content rather than the original data before it went through the formatter.
How do I retrieve the original content before the formatting transformations are applied? FYI I am populating the table using JSON.
I had to dig through the documentation a bit to come up with the solution, to see it in its original context go here: jqGrid Data Manipulation, specifially the section near the end titled "User Data".
First, modify your jsonReader implementation as follows:
Note the userdata option set to the same as root 'Data'
In my case I needed to retrieve the original row data when the user selected a row. I implemented this as follows:
To retrieve the data within the process row method I have the following:
Where #resultGrid is a reference to my jqGrid.
This will then return the original data bound to that row before any formatting was applied.
A couple of points to note:
rowId
will always return the correct value from 'userData'getGridParam
you need to reference it as 'userData'This is how to retrieve cell data from a row.
columnName is table's column name.