Datagridview绘制
生活随笔
收集整理的這篇文章主要介紹了
Datagridview绘制
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
#region 繪制private void dataGridView_main_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e){int status_column_index = 14;//會診狀態所在列DataGridViewRow row = dataGridView_main.Rows[e.RowIndex];//獲取行DataGridViewCell cell = row.Cells[15];//按鈕所在單元格string status = (row.Cells[status_column_index]).Value.ToString();//每行中的狀態所在列if (status == "1" && cell.GetType() == typeof(DataGridViewButtonCell) && cell.Style.NullValue.ToString() != "報告")//當每行中的狀態列不為4時就把此行中的審核按鈕替換為文本單元格
{cell.Style.NullValue = "分診";}if (status == "3" && cell.GetType() == typeof(DataGridViewButtonCell) && cell.Style.NullValue.ToString() != "審核")//當每行中的狀態列不為4時就把此行中的審核按鈕替換為文本單元格
{cell.Style.NullValue = "重新分診";}}#endregion
?
轉載于:https://www.cnblogs.com/wmm-pcy/p/9752850.html
總結
以上是生活随笔為你收集整理的Datagridview绘制的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: numpy——axis
- 下一篇: 算法笔记(个人用)(不定期更新)