例如
function GetColFroZenCount:Integer;
//计算锁定列
try DBG_Master.FrozenCols := GetColFroZenCount; except DBG_Master.FrozenCols :=0 end;
function TFmWDDPH.GetColFroZenCount: Integer;
var
iCount,i:Integer;
begin
iCount := 0;
for i:= 0 to DBG_Master.VisibleColCount -1 do
begin
iCount := iCount +1;
if DBG_Master.VisibleColumns[i].FieldName = 'CGZTS' then
Break;
end;
Result := iCount;
end;