zoukankan      html  css  js  c++  java
  • cxGrid数据录入

    一、数据录入

    1 在TcxGridDBTableView中,设定属性

      NewItemRow.Visible = True

    2 在cxgrid中输入数据怎样回车换行 
      在TcxGridDBTableView中 
      将属性OptionsBehavior.FocusFirstCellOnNewRecord = True 
            OptionsBehavior.GoToNextCellOnEnter = True 
            OptionsBehavior.FocusCellOnCycle = True 
    就可以了.

    如果愿意也可以添加其自带的操作按钮,OptionsView.Navigator = True

    随后在NavigatorButtons属性中做微调。

    3 使用TcxGridDBCardView录入时,一些属性不一样,此时除了修改OptionsBehavior中的属性值外,还要修改OptionData.Appending=True,同时要添加其自带的操作按钮,才行。

    二、LookUp功能

    1 在cxGrid中使用LookUp功能 
      在相应的列(TcxGridDBColumn)中将属性Properties = LookupComboBox 
                Properties.ListSource = 数据源 
                Properties.ListFieldNames = 相应字段 
                Properties.KeyFieldNames = 关键字段 
      也可以修改Properties.ListOptions.ShowHeader,可控制是否显示列头。

    with createColumn do
    begin
      Name := 'PayDetail_Id';
      Width := 1;
      HeaderAlignmentHorz := taCenter;
      HeaderAlignmentVert := vaCenter;
      Visible := false;
      tag := 0;
      PropertiesClass := TcxTextEditProperties;
      with TcxTextEditProperties(Properties) do
      begin
         Alignment.Vert := taVCenter;
         ReadOnly := true;
      end;                        
    end;
  • 相关阅读:
    2016"百度之星"
    codeforces 55 div2 C.Title 模拟
    codeforces 98 div2 C.History 水题
    codeforces 97 div2 C.Replacement 水题
    codeforces 200 div2 C. Rational Resistance 思路题
    bzoj 2226 LCMSum 欧拉函数
    hdu 1163 九余数定理
    51nod 1225 余数的和 数学
    bzoj 2818 gcd 线性欧拉函数
    Codeforces Round #332 (Div. 2)D. Spongebob and Squares 数学
  • 原文地址:https://www.cnblogs.com/karkash/p/9556054.html
Copyright © 2011-2022 走看看