110,534
社区成员
发帖
与我相关
我的任务
分享
for(int i=0;i<datagridView1.RowsCount;i++)
dataGridView1.Rows[i].Cells[1].Value="http://www.sina.com";
private void dataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex == 0 && e.RowIndex != -1)//当你点击的是第1列时才执行下面的内容
{
if(dataGridView.Rows[e.RowIndex].Cells[0].EditedFormattedValue.ToString()=="true")
{
//选中状态时你想执行的内容
}
}
}