日期:2014-05-17 浏览次数:21338 次
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Selected)
            {
                DataGridViewCell aa = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex];
                aa.Style.ForeColor = Color.Red;
                aa.Style.BackColor = Color.LightGreen;
            }
        }