在DBLookupComboboxEh1中显示
select a.FId as 编号,case a.FId when ''00'' then a.FName else '' ''+a.FName end as 名称,a.FName
from MyOrgan我想在其中添加一个临时记录 -1 请选择 不是真的保存到数据库,LockType:=ltBatchOptimistic;DBLookupComboboxEh1.ListSource.DataSet.Append;
DBLookupComboboxEh1.ListSource.DataSet.FieldByName('编号').AsString:='-1';
DBLookupComboboxEh1.ListSource.DataSet.FieldByName('名称').AsString:='请选择';提示 field '名称' canot be modified
这要怎么解决呢? 我只想临时显示-1 请选择
或者有没有其他多列的非感知Combobox呢?
select a.FId as 编号,case a.FId when ''00'' then a.FName else '' ''+a.FName end as 名称,a.FName
from MyOrgan我想在其中添加一个临时记录 -1 请选择 不是真的保存到数据库,LockType:=ltBatchOptimistic;DBLookupComboboxEh1.ListSource.DataSet.Append;
DBLookupComboboxEh1.ListSource.DataSet.FieldByName('编号').AsString:='-1';
DBLookupComboboxEh1.ListSource.DataSet.FieldByName('名称').AsString:='请选择';提示 field '名称' canot be modified
这要怎么解决呢? 我只想临时显示-1 请选择
或者有没有其他多列的非感知Combobox呢?
你都使用bookup了,应该是它而不是case when来实现显示转换了
错误提示 field '名称' canot be modified
重新添加下静态字段试试
像sum(),avg() ... 等等,結果也是只读的不可编辑