S
sundart
Unregistered / Unconfirmed
GUEST, unregistred user!
DataSource的AutoEdit属性可以控制,但效果不是很好,因为dbEdit照样可以编辑数据,
只是Post时会触发异常,
建议将DBEdit的ReadOnly设为True;
for i:= 0 to form.ComponentCount - 1 do
if form.Components is TDBEdit then
TDBEdit(Form.Components).ReadOnly := True;
当编辑时再设为False
只是Post时会触发异常,
建议将DBEdit的ReadOnly设为True;
for i:= 0 to form.ComponentCount - 1 do
if form.Components is TDBEdit then
TDBEdit(Form.Components).ReadOnly := True;
当编辑时再设为False