zoukankan      html  css  js  c++  java
  • 两个自己写的合并GridView 行的方法

    代码
            public void MergeRow(GridView gv, int cellNum)
            {
                
    int i = 0;
                
    int row = 0;
                
    foreach (KeyValuePair<stringint> kp in this.HashECR)
                {
                    GridViewRow gvr 
    = gv.Rows[i];
                    gvr.Cells[cellNum].RowSpan 
    = kp.Value;
                    row 
    = row + kp.Value;
                    
    int next = i + 1;
                    
    for (int j = next; j < row; j++)
                    {
                        GridViewRow gvrNext 
    = gv.Rows[j];
                        gvrNext.Cells[cellNum].Visible 
    = false;
                    }
                    i 
    = i + kp.Value;
                }
            }
    代码
    public void MergeBomChangeRow(GridView gv, int cellNum)
            {
                
    int i = 0;
                
    int allrow = 0;
                
    while (i < gv.Rows.Count)
                {
                    GridViewRow gvr 
    = gv.Rows[i];
                    
    int row = int.Parse(((Label)gvr.FindControl("lblRows")).Text);
                    gvr.Cells[cellNum].RowSpan 
    = row;
                    
    for (int j = 1; j < row; j++)
                    {
                        GridViewRow gvrNext 
    = gv.Rows[j + i];
                        gvrNext.Cells[cellNum].Visible 
    = false;
                    }
                    allrow 
    = allrow + row;
                    i 
    = allrow;
                }

            }
  • 相关阅读:
    HearthBuddy投降插件2019-11-01的使用
    正则表达式在线分析 regex online analyzer
    Tips to write better Conditionals in JavaScript
    The fileSyncDll.ps1 is not digitally signed. You cannot run this script on the current system.
    Cannot capture jmeter traffic in fiddler
    JMETER + POST + anti-forgery token
    input type color
    HearthBuddy修改系统时间
    What are all the possible values for HTTP “Content-Type” header?
    UDK性能优化
  • 原文地址:https://www.cnblogs.com/andycai/p/1893506.html
Copyright © 2011-2022 走看看