C# datagridview change style when specific column value changes
dgList = datagridview name
private void dgList_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
int temp_row_index = e.RowIndex;
int temp_column_index = e.ColumnIndex;
if (temp_row_index >= 0 && temp_column_index == 9)
{
DataGridViewCell cell = dgList.Rows[temp_row_index].Cells[temp_column_index];
cell.Style.Font = new Font("맑은 고딕", 13F, FontStyle.Bold);
}
}
반응형
'coding > Visual Studio' 카테고리의 다른 글
c# bitmap 라인 그리기 예제 (0) | 2024.06.19 |
---|---|
C-multiplication table(구구단) (0) | 2024.06.05 |