zoukankan      html  css  js  c++  java
  • Tcxgrid使用例子

    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;
  • 相关阅读:
    1767:字符合并
    成绩单
    floj 2264
    floj 2265 【lxs Contest #141】航海舰队
    CF932D Tree
    1745:分组
    1744:跳台阶
    Xamarin.Forms之跨平台性能
    Xamarin.Forms之部署和测试(性能)
    Xamarin.Forms数据绑定
  • 原文地址:https://www.cnblogs.com/qi123/p/9910363.html
Copyright © 2011-2022 走看看