zoukankan      html  css  js  c++  java
  • DevExpress GridView常用属性

    序号 功能 常用代码

    1

    支持多选 this.GridView1.OptionsSelection.MultiSelect = true;

    2

    显示滚动条 this.GridView1.OptionsView.ColumnAutoWidth = false;
    3 显示统计信息

    this.GridView1.OptionsView.ShowFooter = true;
    this.gridColumn1.Summary.AddRange(new DevExpress.XtraGrid.GridSummaryItem[] {
    new DevExpress.XtraGrid.GridColumnSummaryItem(DevExpress.Data.SummaryItemType.Count, "FieldName", "总计: {0}")});

    4 是否允许编辑 this.gridColumn1.OptionsColumn.AllowEdit = false;
    5 允许选择单个单元格,并拷贝单元格的值

    this.GridView1.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CellSelect;

    this.gvShopeeSellingData.OptionsBehavior.CopyToClipboardWithColumnHeaders = false;

    6 修改特定列的背景色 this.gridColumn1.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
    7 修改选中行的颜色 this.gvShopeeItemOperationData.Appearance.SelectedRow.BackColor = System.Drawing.SystemColors.MenuBar;
    8 checkbox 需要双击才能选中?No

    1. 设置checkbox列为Selected。绑定的数据源中返回(0  as Selected)

    2. 设置RowCellClick 设置对应的单元格的值为0/1 

    gv.SetFocusedRowCellValue(e.Column, values);

    3. 进入“In-place Editor Repository” ,修改对应的控件的Valuechecked为1,ValueUnchecked为0

  • 相关阅读:
    普通摄像头交互——视频翻书
    笔记本3K4K
    OOP(转)
    DllImport 和extern
    java串口通信 (转)
    HttpWatch截取网页数据的工具以及介绍
    在 resources 参数中指定了多次。 resources 参数不支持重复项—解决方法
    “设计”你的代码(转)
    如何获取ultraComboEditor选中的值
    将数组绑定到 ODP.NET 数据库命令
  • 原文地址:https://www.cnblogs.com/gg_lihui/p/8149255.html
Copyright © 2011-2022 走看看