• 取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;
            }
  • 相关阅读:
    项目延期原因及应对之道
    我只是来刷屏的
    php学习1留言板的创建
    位运算
    hnu 12264 collisions
    数组和指针的区别
    hnu12263 Gluttonous robot
    解决Mac上安装Zookeeper问题:FAILED TO WRITE PID
    Dubbo问题记录:No provider available for the service xxx from registry localhost:9090
    SqlServer和mysql的日期函数备忘
  • 原文地址:https://www.cnblogs.com/RuiLei/p/421474.html
Copyright © 2020-2023  润新知