#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

 

posted on 2018-10-08 10:22  蒙蒙浮霁月  阅读(842)  评论(0编辑  收藏  举报