如何设置DBGrid的一列不可修改 有什么办法让DBGrid的一列不能编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 好像不对fixedcols:Specifies the number of columns on the left of the grid that cannot be scrolled.不能指定某列,听大家怎么说 i为你指定的某列DBGrid1.Columns.Items[i].ReadOnly := true; procedure TMainForm.DBGrid1ColEnter(Sender: TObject);begin if dbgrid1.SelectedField=adoquery1.FieldByName('app_id') then dbgrid1.options:=dbgrid1.options-[dgediting] else dbgrid1.options:=dbgrid1.options+[dgediting];end; 双击DBGrid,弹出一个对话框,单击上面的一个按钮,加上所有字段,点中一个字段,然后在属性编辑器里设置Readonly属性为True INDY UDP 为什么分SERVER 和CLIENT呢 多层架构的两个控件对比? Ttimer怎么不响应了? ado 数据跨库拷贝 在线等待 我想再注册表里判断一个值,决定系统是否启动的问题 为什么一条数据记录不能连续更改两次? 为什么BDE连不起SQL2000 单机版的数据库程序如何在局域网中实现数据共享? 谁有播放DVD的控件, 高分求救!!! 再提个问题, 程序员的出路在那里。 我们该从什么做起? 一个关于DBCHART的使用问题。 各位请给个回应,谢谢!
fixedcols:
Specifies the number of columns on the left of the grid that cannot be scrolled.
不能指定某列,听大家怎么说
DBGrid1.Columns.Items[i].ReadOnly := true;
begin
if dbgrid1.SelectedField=adoquery1.FieldByName('app_id') then
dbgrid1.options:=dbgrid1.options-[dgediting]
else
dbgrid1.options:=dbgrid1.options+[dgediting];
end;