DataGridView 中CurrentCell ,如果设置当前单元格的样式(边框,背景)和CurrentRow的样式?备注:SelectionMode 属性值:FullRowSelect。
在线等待。。

解决方案 »

  1.   

    所有行: dataGridView1.RowsDefaultCellStyle.Font = new Font("宋体", 9, FontStyle.Strikeout);
    dataGridView1.RowsDefaultCellStyle.ForeColor = Color.Blue;
    dataGridView1.RowsDefaultCellStyle.BackColor = Color.Red;选中行:dataGridView1.SelectedRows[0].DefaultCellStyle.Font = new Font("宋体", 9, FontStyle.Strikeout);
    dataGridView1.SelectedRows[0].DefaultCellStyle.ForeColor = Color.Blue;
    dataGridView1.SelectedRows[0].DefaultCellStyle.BackColor = Color.Red;去官方看更加详细
      

  2.   

    LMAOhuaNL:你测试过么?
    SelectionMode 属性值:FullRowSelect。