怎么把DBgrid组件的值改变!!!!!!
比如:DBGRID组件的数据库源的表为TABLE,但TABLE有一字段为Ismarry且该字段为bit 型,我想当ismarry为1是,DGGRID组件显示为结婚,为0时。显示为未婚
怎样设置!!!!!
比如:DBGRID组件的数据库源的表为TABLE,但TABLE有一字段为Ismarry且该字段为bit 型,我想当ismarry为1是,DGGRID组件显示为结婚,为0时。显示为未婚
怎样设置!!!!!
if ismarry=1 then
text=‘结婚'
else
text='未婚'
大概是这样你看看
双击adoquery,出现方框,右键add all fields
然后选择一个field,其事件里有gettext()
写上即可
select newfield= case ismarry when 1 then '结婚' when 0 then '未婚' end from tablename