To do this override the method active from the dataSource of your grid
public int active()
{
boolean canEdit = true;
ForecastModel forecastModel;
int ret;
;
ret = super();
if (ThyProjForcasTable.ProjForecastModelId)
{
forecastModel = ForecastModel::find(HeadingSub::Heading, ThyProjForcasTable.ProjForecastModelId);
if (forecastModel && forecastModel.Blocked)
canEdit = false;
}
this.allowEdit(canEdit);
this.allowDelete(canEdit);
Generate_period.enabled(canEdit);
return ret;
}
Aucun commentaire:
Enregistrer un commentaire