private void dgvTemShow_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) { if (e.RowIndex != -1 && dgvTemShow.Columns[e.ColumnIndex].Name == "FontColor") { e.Value = PublicClass.ColorToText(dgvTemShow.Rows[e.RowIndex].Cells["FontColor"].Value.ToString());//颜色转换为汉语 } else if (dgvTemShow.Columns[e.ColumnIndex].Name == "ShowStyle") { e.Value = PublicClass.AplayToText(Convert.ToInt32(dgvTemShow.Rows[e.RowIndex].Cells["ShowStyle"].Value));//播放方式转换汉语 } else if (dgvTemShow.Columns[e.ColumnIndex].Name == "Tag") { if (Convert.ToInt32(dgvTemShow.Rows[e.RowIndex].Cells["Tag"].Value) == 0) { e.Value = "等待显示"; } if (Convert.ToInt32(dgvTemShow.Rows[e.RowIndex].Cells["Tag"].Value) == 1) { e.Value = "等待显示"; } if (Convert.ToInt32(dgvTemShow.Rows[e.RowIndex].Cells["Tag"].Value) == 2) { e.Value = "正显示"; } } else if (dgvTemShow.Columns[e.ColumnIndex].Name == "修改") { e.Value = "修改"; } }