Preventing the opening of a form on a add button click
Posted
by Jonathan
on Stack Overflow
See other posts from Stack Overflow
or by Jonathan
Published on 2010-05-15T21:17:37Z
Indexed on
2010/05/17
15:20 UTC
Read the original article
Hit count: 385
jqgrid
|jqgrid-php
Hey guys,
Did you guys know how to prevent the open of a Form when I click on a add button?
Maybe using beforeShowForm?
function(formid)
{
if(jQuery('#gridap').getGridParam('selrow'))
{
idgridap=jQuery('#gridap').getGridParam('selrow');
jQuery('#FK_numerocontrato_ap',formid).val(idgridap).attr('readonly','readonly');
}
else
{
// I want to prevent the openning of the add form here and maybe show an alert using the "alertcap"
}
}
CHECAROW;
$grid->setNavEvent('add','beforeShowForm',$checarowid);
BTW, there's a way to call the alertmod of jqgrid and add a custom message to it?
tks!
© Stack Overflow or respective owner