zoukankan      html  css  js  c++  java
  • gridcontrol中添加checkbox复选框

    添加一列,FieldName为 "check",将ColumnEdit 设置为 复选框 样式。gridview1 editable设置为true

      将要绑定的DataTable添加列 "check",Type 为 bool。

      绑定DataTable到GridControl。

      获取: string value = gridview.GetDataRow(i)["check"].toString();

             value == "true" ||  "" ("false")

     设置为多选

        gridView1 .OptionsSelection.MultiSelect = true;

       gridView1 .OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.RowSelect;

    测试的例子如下:

    给gridcontrol添加数据

    点击测试check按钮响应如下事件(获取被check的数据)

    运行结果如下:

     https://blog.csdn.net/weinierbian/article/details/6255402

  • 相关阅读:
    linux下执行python错误: bad interpreter: No such file or directory
    linux下修改默认python版本
    MySQL 远程连接配置的正确实现
    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 7
    通达信软件快捷键
    MT4快捷键
    vim快捷键
    Linux5.5下配置Centos的yum源
    ls命令结果中文件夹颜色(蓝色)的改变方法
    rest-framework之响应器(渲染器)
  • 原文地址:https://www.cnblogs.com/xihong2014/p/13623960.html
Copyright © 2011-2022 走看看