SMALL

 

private void dbView_CellFormatting(object sender,
DataGridViewCellFormattingEventArgs e) {
{
      //특정값을 가진 열을 좀 다르게 보여주고 싶을 때
      if (e.ColumnIndex == 1)
      {
            if (e.Value != null)
            {
                 string text = e.Value.ToString();
                 if (text.Contains("텍스트"))
                 {
                      e.CellStyle.ForeColor = Color.Red;
                      e.CellStyle.SelectionForeColor = Color.Red;
                  }
              }
         }
  }




 

참고링크

https://blueasa.tistory.com/332

LIST

+ Recent posts