zoukankan      html  css  js  c++  java
  • [Andrew]Ext.net Grid常用js

     var gridFunction= function (gridId) {
                    //获取当前Grid
                    var gridView = Ext.getCmp(gridId);

          //获取当前选中行
                    var selectedData = gridView.getSelectionModel().getSelection();

                    //选中数据总行数

                    var selectCount=selectedData.length;

                    //获取Grid Store数据
                    var store = gridView.getStore();

                    //当前Grid的所有数据

                    var allData=store.data;

                    //当前Grid数据总行数

                    var sumCount=allData.length;

          var cloumnData = [];

                    //判断Grid是否有选中数据
                    if (gridView.getSelectionModel().hasSelection()) {
                        for (var i = 0; i < selectedData.length ; i++) {

             //当前选中行数据

             var currentData=selectedData[i].data;

                            //移除当前行数据
                            store.remove(selectedData[i]);

                            //获取当前行某列数据

             var name=selectedData[i].data.Name;

               //将当前行数据添加到数组当中

            cloumnData.push(currentData);
                        }

            //序列化Grid的数据

            return Ext.JSON.encode(cloumnData);
                    }

          return "";
        };

  • 相关阅读:
    利用 FFmpeg 和 ImageMagick, AVI 转 GIF(不失真)
    TinyMCE textarea 输入框外部程序动态修改方法
    eclipse快速向下复制行
    ${factoryList }后面有空格不影响
    pre标签
    js备忘录_2
    eclipse 中 大小写切换:ctrl+shift+x 转为大写 ctrl+shift+y 转为小写
    js备忘录_1
    缓存
    myeclipse bug
  • 原文地址:https://www.cnblogs.com/teamate/p/3670313.html
Copyright © 2011-2022 走看看