zoukankan      html  css  js  c++  java
  • extjs grid 复选框选择事件

    开发中需求是统计选择的行数,所以要监控checkbox的选择事件包括表头的全选事件

    遇到的问题就不赘述了 

    方案是监控grid的复选框和行加载时绑定事件

       baseView: DBEN.controls.IGrid;

       

    init() {
    super.init();

    let obj = this;
    this.baseView.on("selectionchange",
        function (rowModel, record, rowIndex, eOpts) {
            var selections = obj.invoiceGrid.getSelectionModel().getSelection();
            var selectionLength = selections.length;
            obj.disSelectedIndex.setRawValue(selectionLength);
    });

     

    //行点击事件

    this.control(this.view, {
          gridInvoiceDetail: { rowclick: this.egpUpGridRowClick }
    })

    }

     

     

    egpUpGridRowClick(grid, row) {
        var selections = this.invoiceGrid.getSelectionModel().getSelection();
        var selectionLength = selections.length;
        this.disSelectedIndex.setRawValue(selectionLength);
    }

     

     

  • 相关阅读:
    Xshell 设置右键粘贴功能
    python中dict操作集合
    mac 设置网页字体
    博客收藏
    memcache 安装与简单使用
    mac安装homebrew
    Graphviz下载 使用
    jekyll 与hexo
    js 汉字排序
    初试gem
  • 原文地址:https://www.cnblogs.com/dbycl/p/5767469.html
Copyright © 2011-2022 走看看