在stringgrid中,我只想对某一列可以编辑,其它的都不行。 if acol=2 then
begin
stringgrid1.options:=stringgrid1.options+[goediting];
//如果这样做就会使所有的都可编辑了,怎样实现只可以编辑那一列呢?
end;
begin
stringgrid1.options:=stringgrid1.options+[goediting];
//如果这样做就会使所有的都可编辑了,怎样实现只可以编辑那一列呢?
end;
ARow: Integer; Rect: TRect; State: TGridDrawState);
begin
if stringgrid1.Col = 2 then
begin
Stringgrid1.Options := StringGrid1.Options + [goediting];
end
else Stringgrid1.Options := StringGrid1.Options - [goediting];
end;