#region 设置单元格内容的显示格式 private void dataGridView_main_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) { #region 判断 int requestType_column_index = 9; if (e.ColumnIndex == requestType_column_index) { string sval = (e.Value ?? "").ToString(); switch (sval) { case "1": e.Value = "视频"; break; case "2": e.Value = "电话"; break; } } #endregion } #endregion