有什么需要特别设置的地方吗?其他字段都可以更新而逻辑字段就不可以,:(
procedure TForm1.DBGrid1CellClick(Column: TColumn);
begin
if column.FieldName='check' then
with datamodule2.ClientDataSet1 do
begin
Edit;
FieldByName('check').AsBoolean:=true;
Post;
ApplyUpdates(0);
end;
procedure TForm1.DBGrid1CellClick(Column: TColumn);
begin
if column.FieldName='check' then
with datamodule2.ClientDataSet1 do
begin
Edit;
FieldByName('check').AsBoolean:=true;
Post;
ApplyUpdates(0);
end;
先转换成字符串,再转回来就可以了,好象我用的oracle中占两个字符位吧
定义为 char(2),true为-1,false 为0,不知道别的数据库中如何
后,执行datamodule2.ClientDataSet1。refresh告诉我需要Apply Updates