I have constructed a jqgrid dynamically, i am unable to invoke the function onclick of the button.
My Code:
function buildButtons(cellvalue, options, rowObject) {
var optionsRowId = options.rowId;
var editDelButtons = "<input style=\"height:22px;width:40px;\" type=\"button\" value=\"Edit\" onclick=\"javascript:testRow('" + optionsRowId + "')\" />";
return editDelButtons;
}
function testRow(rowID)
{
alert(rowID);
}
}
The error i get always when i click on the buton in each row of jqgrid is "function is not defined"
My function is written right below the customFormatter function.
Please help me ASAP, thanks in advance.