powergov Posted July 18, 2017 Share Posted July 18, 2017 procedure Tmd01.FDM_Shangpin_jiageBeforePost(DataSet: TDataSet); var s :string; begin if md01.FDM_Shangpin_jiage.FieldByName('sonnum').AsInteger = 0 then begin s := 'Do nothing' ; s := md01.FDM_Shangpin_jiage.FieldByName('typeid').AsString.Trim; md01.FDC_OneUpdate_price.ParamByName('pm2').AsFloat := md01.FDM_Shangpin_jiage.FieldByName('PreSalePrice1').AsFloat ; md01.FDC_OneUpdate_price.ParamByName('pm3').AsFloat := md01.FDM_Shangpin_jiage.FieldByName('PreSalePrice2').AsFloat ; md01.FDC_OneUpdate_price.ParamByName('pm4').AsFloat := md01.FDM_Shangpin_jiage.FieldByName('PreSalePrice3').AsFloat ; md01.FDC_OneUpdate_price.ParamByName('pm5').AsString := md01.FDQ_sysdate.FieldByName('实时').AsString.Trim + ' By ' + md01.username ; md01.FDC_OneUpdate_price.ParamByName('pm1').AsString := s ; md01.FDC_OneUpdate_price.Execute() ; end; end; When I modified one record in unidntreegrid, I was hoping to execute a TFDCommand only for the current record,but TFDCommand run (the rows count in unidntreegrid) times,I think It should be traversal all records in unidntreegrid! Quote Link to comment Share on other sites More sharing options...
powergov Posted July 18, 2017 Author Share Posted July 18, 2017 if have column A,column B,column C,When I modified column B or column C,I want to automatically write the current system time to column A, and I don't allow keyboard input. I will use the beforepost to set value to column A, but it will automatically set column A value to all the rows in the unidbtreegrid Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.