<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">this.dataGridView1.Rows[2].Cells[0].Value = true; //选中datagridview第三行第一列中的checkbox为选中</span>
dataGridView1.Columns["TProjTypeID"].HeaderText = "项目类别编号"; //给指定的编号一个别名
string sql = string.Format(sqls);
ds = new DataSet();
sda = new SqlDataAdapter(sql, dbh.conn);
sda.Fill(ds, "table");
dataGridView1.DataSource = ds.Tables[0];
//访问数据库并绑定到datagridview
cbotype.SelectedIndex // 获取当前combobo选中的当前值
dataGridView1.CurrentRow.Cells[1].Value //获取点击行中第二个列的值