zoukankan      html  css  js  c++  java
  • DevExpress

    如何设置多选,并对多个选中行进行数据处理。

    1、首先需要将需要获取的字段的列添加到 Grid 中,例如 grdDemoColumn1。

    2、将 Grid 的 OptionsSelection 中的 CellSelection 设置为 false,MultiSelect 设置为 True,以允许进行多选。

    3、添加一个过程用于逐行处理选中行数据,其中过程名需要自己变更一下。

     procedure ForeachProcessProcedureName(ARowIndex: Integer; ARowInfo: TcxRowInfo); 

    4、在需要处理多选数据的事件中,使用如下方法调用(其中,true 表示只处理选中行数据)。

     grdDemo.DataController.ForEachRow(true, ForeachProcessProcedureName); 

    5、在 ForeachProcessProcedureName 方法中,可用如下方式获取得指定的字段对应的值。

    procedure ForeachProcessProcedureName(ARowIndex: Integer; ARowInfo: TcxRowInfo);
    var
    value: LargeInt; begin value := grdDemo.DataController.GetValue(ARowInfo.RecordIndex, grdDemoColumn1.Index); //Other Code end;
  • 相关阅读:
    VUE项目开发流程
    vue-导入element-ui
    微信小程序开发-踩坑
    python-编码问题
    python-导入自定义模块
    maven安装配置
    npm修改源
    gitlab使用指南
    Wox使用指南
    Linux拷贝文件夹
  • 原文地址:https://www.cnblogs.com/xiefang2008/p/4869537.html
Copyright © 2011-2022 走看看