Hi.
I have been working with jqGrid and am a bit stumped as to why the following will not operate as expected, the single line of code simply uses the formatter to update a row - if I insert a value into the ID parameter it works fine (see commented line) - and if I use a variable it simply doesnt work.
Am I missing something?
The ID for the row is numeric.
The following is called from colModel using the formatter ->
//formatter
typeHighlight = function(cellvalue,options,rowdata){
if(cellvalue == "Invoice Required" || cellvalue == "Finished"){
var rowID = options.rowId; //gets the row id
setRow(rowID); //sets the row colour
return cellvalue;
}else{
return cellvalue;
}
}
setRow = function(rowID){
$("#list2").jqGrid('setRowData',rowID,false,'rowDone'); //new api
//$("#list2").setRowData(rowID,false,'rowDone'); //old method
//("#list2").setRowData(1323,false,'rowDone'); //note the row id manually inserted
}
As noted above, when I add the row id in manually - it works, the only thing that fails is when I try to add the row id programatically - it displays in firebug console as a correct value incidentally.
Thank you for any help
Oo