zoukankan      html  css  js  c++  java
  • 取HyperLink中的值

     public ArrayList judgeIsChecked()
            {
                foreach (GridViewRow row in this.gvUserInfo.Rows)
                {
                    CheckBox checkBox = (CheckBox)row.FindControl(DELFLAG);
                    //被选中的记录处理
                    if (checkBox.Checked)
                    {
                        for (int j = 1; j < this.gvUserInfo.Columns.Count; j++)
                        {
                            //HeaderText==姓名
                            string nameCellInfo = this.gvUserInfo.Columns[1].HeaderText.ToString();
                            //存放Cell中的值
                            string cellInfo = EMPTYSTRING;
                            if (nameCellInfo.Equals(this.gvUserInfo.Columns[j].HeaderText.ToString()))
                            {
                                //取HyperLink中的值
                                HyperLink hlValue = (HyperLink)row.Cells[1].Controls[0];
                                cellInfo = nameCellInfo + COLON + hlValue.Text;
                            }
                            else
                            {
                                cellInfo = this.gvUserInfo.Columns[j].HeaderText.ToString() + COLON + gvUserInfo.Rows[i].Cells[j].Text;
                            }
                            newArrayList.Add(cellInfo.Trim());
                        }
                    }
                    i++;
                }
                return newArrayList;
            }
  • 相关阅读:
    为了博多
    [JSOI2008]星球大战starwar
    【网络流24题】最小路径覆盖问题
    【中学高级水题本】关路灯
    【网络流24题】分配问题
    【网络流24题】方格取数问题
    【网络流24题】汽车加油行驶
    [洛谷P2057][bzoj1934]善意的投票(最大流)
    LeetCode(38) Count and Say
    LeetCode(36)Valid Sudoku
  • 原文地址:https://www.cnblogs.com/RuiLei/p/421474.html
Copyright © 2011-2022 走看看