• 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;
  • 相关阅读:
    装饰器
    异常处理与断言
    例子:对象构造函数指定类型传入参数(描述符与装饰器的应用)
    Python的描述符
    全新开始fighting
    函数相关知识
    集合的介绍以及简单方法
    列表,元组,字典类的常见简单方法
    Python简单字符串函数介绍
    聚合函数及分组查询及F&Q
  • 原文地址:https://www.cnblogs.com/m0488/p/9556054.html
Copyright © 2020-2023  润新知