javascript jqgrid events afterShowForm

JavaScript
jQuery("#user-grid").jqGrid('navGrid','#user-grid-pager',
    { }, //options
    { // edit options
        beforeShowForm: function(frm) { 
            $('#username').attr('readonly','readonly'); 
        }
    }, 
    { // add options
        beforeShowForm: function(frm) { 
            $('#username').removeAttr('readonly'); 
        },
  		afterShowForm:function(frm){
        }
    }, 
    { }, // del options
    { } // search options
);
Source

Also in JavaScript: