![]()
![]()
procedure TbsAdPartParaDMSForm.cxGridDBTableView3Editing(
Sender: TcxCustomGridTableView; AItem: TcxCustomGridTableItem;
var AAllow: Boolean);
var
v_code: string;
begin
inherited;
AAllow := true;
if (Pos('1248100',cxGridDBTableView3.Controller.FocusedRecord.Values[cxgridparaCode.Index])>0 )
//这个pos函数的作用是检索cxgridparaCode这列的每一行值所包含的字符串‘1248100’的个数
and (AItem.Index=cxGridDBTableView3PARA_VALUE.Index) then
AAllow:=False ;
// else
// AAllow:=True;
v_code := Trim(cxGridDBTableView3.Controller.FocusedRecord.Values[cxgridparaCode.Index]) ;
if ((v_code = '1') or (v_code = '2')) and (AItem.Index=cxGridDBTableView3REMARK.Index) then
AAllow := false ;
// else
end;