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;
        }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-19
  • 2022-12-23
  • 2021-06-16
  • 2022-12-23
  • 2021-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2022-01-19
  • 2021-11-08
  • 2022-12-23
相关资源
相似解决方案