日期:2014-05-18 浏览次数:21501 次
private void button1_Click(object sender, EventArgs e)
{
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
DataGridViewCheckBoxCell chk = (DataGridViewCheckBoxCell)dataGridView1.Rows[i].Cells[0];
if ((Boolean)chk.EditedFormattedValue == true)
{
string username = dataGridView1.Rows[i].Cells["username"].Value.ToString();
string userid = dataGridView1.Rows[i].Cells["userid"].Value.ToString();
}
}