zoukankan      html  css  js  c++  java
  • cxGrid常用属性设置

    • OptionsView部分
    是否使用表头分组:cxGrid1DBTableView1.OptionsView.GroupByBox
    单元格高度自适应:cxGrid1DBTableView1.OptionsView.CellAutoHeight
    单元格列宽自适应cxGrid1DBTableView1.OptionsView.ColumnAutoWidth
    是否启用页脚:cxGrid1DBTableView1.OptionsView.Footer
    是否启用表头:cxGrid1DBTableView1.OptionsView.Header
    是否启用左侧指示器:cxGrid1DBTableView1.OptionsView.Indicator
    左侧指示器宽度:cxGrid1DBTableView1.OptionsView.IndicatorWidth
    • TcxGridDBDataController部分
    可以根据cxGrid筛选出来的数据打印:cxGrid1DBBandedTableView1.DataController.Filter.AutoDataSetFilter属性设为True,需要DataSet支持(FastReport支持)
    •  表格拖动大小,移动位置后保存到ini文件
      //更改位置后保存
      procedure TForm1.cxGrid1DBTableView1ColumnPosChanged(Sender: TcxGridTableView; AColumn: TcxGridColumn);
      begin
        cxGrid1DBTableView1.StoreToIniFile(cxGrid1DBTableView1.Name + '.ini');
      end;
      
      //更改列宽后保存
      procedure TForm1.cxGrid1DBTableView1ColumnSizeChanged(Sender: TcxGridTableView; AColumn: TcxGridColumn);
      begin
        cxGrid1DBTableView1.StoreToIniFile(cxGrid1DBTableView1.Name + '.ini');
      end;
      
      //根据配置文件恢复显示
      procedure TForm1.FormShow(Sender: TObject);
      begin
        cxGrid1DBTableView1.RestoreFromIniFile(cxGrid1DBTableView1.Name + '.ini');
      end;
  • 相关阅读:
    apache反向代理和负载均衡
    maven学习3,如何创建一个web项目
    初识maven及其安装步骤!!
    初识Eclipse!!
    登录页面!!!
    面向对象的三大要素
    【转载】fatal error C1010: unexpected end of file while looking for precompiled header directive
    C++ 读取XML 和TXT
    python +Libsvm 配置
    C++ 引用 和 指针 心得
  • 原文地址:https://www.cnblogs.com/liessay/p/5322349.html
Copyright © 2011-2022 走看看