Preventing the opening of a form on an ad
- by Jonathan
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!