JQGrid default Functions, afterShowForm, beforeShowForm
jQuery("#gvUserManager").jqGrid('navGrid', '#userManagerPagenav',
{ del: false, search: false, refresh: false, }, //options
{
height: 280, reloadAfterSubmit: false, closeAfterEdit: true,
beforeShowForm: function(formid) {
var rowId = $("#gvUserManager").jqGrid('getGridParam', 'selrow');
var rowData = jQuery("#gvUserManager").getRowData(rowId);
if (rowData.UserType == "Client") {
$('#tr_UserType', formid).hide();
}
},
afterclickPgButtons: function(whichbutton, formid, rowid) {
var rowData = jQuery("#gvUserManager").getRowData(rowid);
if (rowData.UserType == "Client") {
$('#tr_UserType', formid).hide();
}
else {
$('#tr_UserType', formid).show();
}
},
afterShowForm: function(formid) {
$('#tr_UserName td #UserName', formid).prop("disabled", true);
},
}, // edit options
{
height: 280, reloadAfterSubmit: false,
closeAfterAdd: true,
afterShowForm: function(formid) {
},
zIndex: 0
}, // add options
{ reloadAfterSubmit: false }, // del options
{} // search options
);
{ del: false, search: false, refresh: false, }, //options
{
height: 280, reloadAfterSubmit: false, closeAfterEdit: true,
beforeShowForm: function(formid) {
var rowId = $("#gvUserManager").jqGrid('getGridParam', 'selrow');
var rowData = jQuery("#gvUserManager").getRowData(rowId);
if (rowData.UserType == "Client") {
$('#tr_UserType', formid).hide();
}
},
afterclickPgButtons: function(whichbutton, formid, rowid) {
var rowData = jQuery("#gvUserManager").getRowData(rowid);
if (rowData.UserType == "Client") {
$('#tr_UserType', formid).hide();
}
else {
$('#tr_UserType', formid).show();
}
},
afterShowForm: function(formid) {
$('#tr_UserName td #UserName', formid).prop("disabled", true);
},
}, // edit options
{
height: 280, reloadAfterSubmit: false,
closeAfterAdd: true,
afterShowForm: function(formid) {
},
zIndex: 0
}, // add options
{ reloadAfterSubmit: false }, // del options
{} // search options
);
Comments