标签:必须 mon set lan obj begin enc 否则 send
1、更改某个单元格的值后,其他单元格的值也相应改变
直接点击单元格进行更改值,然后在改单元格增加相应的事件:
procedure Tfrm_BarCode_makecl5.gdtv_1select_ticketPropertiesEditValueChanged( Sender: TObject); var i_SalesCount:Integer; begin try ReFreshMsgInTime(); if (bDoOldBill) then Exit; if cds_Plan.State = dsEdit then //cxgrid关联的数据集clientdataset为cds_Plan cds_Plan.Post; //必须先POST后再去Edit,否则更改的值会丢失 cds_Plan.Edit; i_SalesCount := cds_Plan.FieldByName(‘select_ticket‘).AsInteger; cds_Plan.FieldByName(‘tfare‘).Value := cds_Plan.FieldByName(‘price‘).AsCurrency * i_SalesCount; cds_Plan.FieldByName(‘JSAllmoney‘).Value := cds_Plan.FieldByName(‘price2‘).AsCurrency * i_SalesCount; finally if cds_Plan.State = dsEdit then cds_Plan.Post; CountMoney(); end; end;
标签:必须 mon set lan obj begin enc 否则 send
原文地址:https://www.cnblogs.com/qi123/p/9910363.html