zoukankan      html  css  js  c++  java
  • 获取subgrid中的数据并修改,含添加刷新列表的事件

    var isAddRefresh = false;
    
    function setLawsuitQueryResultText() {
        var queryResultIndex = 7;
    
        var gridControl = window.parent.document.getElementById('lawsuitquery').control;
        if (gridControl) {
            var linkElement = '<nobr class="gridcellpadding" title="查询失败"><span style="color:grey;">查询失败</span></nobr>';
            var innerGrid = gridControl.getRecordsFromInnerGrid();
            if (innerGrid.length > 0) {
                for (var i = 0; i < innerGrid.length; i++) {
                    var queryResult = gridControl.getRecordsFromInnerGrid()[i][3].cells[queryResultIndex].outerText;
    
                    if (queryResult) {
                        if (queryResult.indexOf('查询失败') > -1) {
                            $(gridControl.getRecordsFromInnerGrid()[i][3].cells[queryResultIndex]).html(linkElement);
                        } else {
                            $(gridControl.getRecordsFromInnerGrid()[i][3].cells[queryResultIndex]).find('a').text('查询结果');
                            $(gridControl.getRecordsFromInnerGrid()[i][3].cells[queryResultIndex]).find('a').css('color', '#1160B7');
                        }
                    }
                }
            }
    
            if (!isAddRefresh) {
                gridControl.add_onRefresh(setLawsuitQueryResultText);//给subgrid添加刷新列表后的事件
                isAddRefresh = true;
            }
        } else {
            setTimeout("setLawsuitQueryResultText()", 500);
        }
    }
    

      

  • 相关阅读:
    Day 25 网络基础2
    Day 25 网络基础
    Day 24 定时任务
    Day 23 系统服务之救援模式
    Day4 总结
    Day 22 进程管理2之系统的平均负载
    【Distributed】分布式Session一致性问题
    【Distributed】分布式系统中遇到的问题
    【Redis】分布式Session
    【Zookeeper】应用场景概述
  • 原文地址:https://www.cnblogs.com/tck-blogs/p/10224894.html
Copyright © 2011-2022 走看看