dbgrid显示问题(菜鸟问题,进来拿分),十分火急!!!!!!!
swxwy 2003-08-21 05:03:33 我在dbgrid显示中,我想通过用户的选择使dbgrid 为可编辑状态或不可编辑状态,但我发现一旦选择了Options 中的dgrowselect属性就改变不会可编辑状态了,为什么啊,代码如下
begin
if CheckBox1.Checked then
begin
DBGrid2.Options :=DBGrid2.Options-[dgrowselect,dgAlwaysShowSelection];
DBGrid2.ReadOnly :=false;
end
else
begin
DBGrid2.Options :=DBGrid2.Options+[dgrowselect,dgAlwaysShowSelection];
DBGrid2.ReadOnly :=true;
end;
end;