格式化 14,15列将编码显示为编码值

 1 this.dgv_prescription.CellFormatting +=
 2     (object sen, DataGridViewCellFormattingEventArgs ev) =>
 3     {
 4         DataGridView dgv = (DataGridView)sen;
 5         if (ev.RowIndex < dgv.Rows.Count - 1)
 6         {
 7             if (ev.ColumnIndex == 14 || ev.ColumnIndex == 15)
 8             {
 9                 ev.Value = ev.Value.ToString() == "1" ? "" : "";
10             }
11         }
12     };

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
  • 2022-12-23
  • 2021-06-20
  • 2022-01-11
  • 2022-12-23
猜你喜欢
  • 2021-09-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
  • 2022-12-23
  • 2022-12-23
  • 2021-03-29
相关资源
相似解决方案