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;
  • 相关阅读:
    N^N hdu1060
    二叉树的所有操作
    溢出问题
    POJ1562深搜问题
    已知前序,中序,求后序
    交换a,b
    深度和广度优先搜索
    最长回文子串
    scanf
    WCF Ria Service 理解
  • 原文地址:https://www.cnblogs.com/qi123/p/9910363.html
Copyright © 2011-2022 走看看