同题。

解决方案 »

  1.   

    bpost :boolean=false;onbtnPosclick
      bpost :=true;
      query.post;
      bpost :=false;beforpost
      if bpost then
        cancel
      

  2.   

    你用什么编辑?dbgrid?dbedit?
    首先在 onenter oncellenter 中备份数据
    你可以在onexit or oncellexit 中判断,如果备份和现在的数据不一致,则把备份的数据写回
      

  3.   

    不想让用户在DBGrid中编辑,所以就用DBEdit了。而此时也不想让用户无意中点击了DBGrid而保存数据,因为更新触发器和插入触发器有所不同。前段时间看到同事的程序,实现了这样的功能,可是那个DBGrid没有任何事件。怀疑有此类的设置。
      

  4.   

    DBGrid1.Options:=DBGrid1.Options-[dgediting];