Is that possible to retrieve the value from the jqgrid afterinsertrow
function? I tried to alert the data but it displays "undefined"
:
function(rowid,data){
alert(data.Name); // "Name" is my column name
}
Is that possible to retrieve the value from the jqgrid afterinsertrow
function? I tried to alert the data but it displays "undefined"
:
function(rowid,data){
alert(data.Name); // "Name" is my column name
}
The afterInsertRow executes only when the grid parameter gridview is false
$("#grid").jqGrid({
...
gridview : false,
afterInsertRow : function( rowid, rowdata, rawdata) {
// do something
}
});
By default this parameter is true
P.S Added example. Please check this demo
This may not be an answer but the example I created here http://jsfiddle.net/8dYNq/ could give you some idea.
You will get the data via afterInsertRow
event args when initializing the jqGrid
. But when + icon is clicked, it will insert a blank row. Hence field values are undefined
. Please look at console log for details.