private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) { DataGridViewService.VisibleRowOrder(dataGridView1, e); }
/// <summary> /// 在发生所有单元格绘制之后,执行行级绘制时发生的事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) { DataGridViewService.VisibleRowOrder(dataGridView1, e); // 项目 Common 的 DataGridService 类,作用:设置单元格样式 }