/// <summary> /// 加载窗体 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void QueryClubPeoForm_Load(object sender, EventArgs e) { // 按钮设置 if (leader.Identify.Equals("3")) { AddClubPeobutton.Enabled = false; AlterClubPeobutton.Enabled = false; DeleteClubPeobutton.Enabled = false; dataGridView1.ReadOnly = true; // 设置只读 } // dataGridView dataGridView1.RowTemplate.Height = 30; // 行高 // 颜色交替 dataGridView1.RowsDefaultCellStyle.BackColor = Color.White; dataGridView1.AlternatingRowsDefaultCellStyle.BackColor = Color.FromArgb(224, 254, 254); // 第一列、第二列、第三列只读 dataGridView1.Columns[0].ReadOnly = true; dataGridView1.Columns[1].ReadOnly = true; dataGridView1.Columns[2].ReadOnly = true; dataGridView1.DataSource = clubBLL.Find_ALLPeo(); }