在DataGridView1_CellFormatting中加了这一句就卡死了,请问为什么,怎么解决
private void DataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
if (this.DataGridView1.Columns[e.ColumnIndex].Name == "States")
{
int stateID = Convert.ToInt32(e.Value);
e.Value = (new DALService.DALServiceClient()).ProjectTaskStateName(3, stateID);
}
}
把DataGridView1中绑定的列 1 2 3 4 5,转换为状态的中文名称,
1、待分配;2、待处理;3、处理中;4、已完成;5、已取消
请问要怎么修改,谢谢。