I want to get the jGrid data after it has been loaded.
Some columns have formatter but I want to get their original data before format.
The grid columns are :
<sjg:gridColumn name="accountNo" formatter="linkBulider" />
<sjg:gridColumn name="amount" />
I use below js:
var allRowsInGrid = $('#gridtable').jqGrid('getRowData');
for (i = 0; i < allRowsInGrid.length; i++) {
//For accountNo I get the formmated value
allRowsInGrid[i].accountNo;
//The amount is ok as it is unformated
allRowsInGrid[i].amount;
}
According to wiki
getRowDatadoesn't return the actual data from the grid.Once you used a custom
formatteroption to format a cell content, you need an option to unformat the data.At this point you might check if the
sjg:gridColumncould be set an attribute to defineunformatfunction. Unfortunately, you can't do it according to TLD.However, you can modify the grid after it's loaded.