数据库控件好像有一个DisableControl方法?

解决方案 »

  1.   

    在TQuery的AfterPost里设disabled
    在beforeedit&beforeInsert中设enabled
      

  2.   

    数据缓冲区状态由UpdatesPending指定:
    (请好好看Help文档,相关的还有:Working with cached updates 主题,有详细描述)Indicates whether the cached updates buffer contains records that are not yet applied.property UpdatesPending: Boolean;DescriptionExamine UpdatesPending to check the status of the cached updates buffer. If UpdatesPending is True, then there are edited, deleted, or inserted records to apply to the database. If UpdatesPending is False, there are no records in the cache.
      

  3.   

    谢谢Muf,你的说法是对的,问题是该把ButtonSave.Enabled:=DataSource1.DataSet.Updatespending放到哪个事件中呢?
      

  4.   

    我知道该怎么做了,给分Muf兄。