private void 发货单DataGridView_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
if (e.Value == null)
return;
if (发货单DataGridView.Columns[e.ColumnIndex].Name = "利润" && int.Parse(e.Value.ToString() < 0))
{
e.CellStyle.BackColor = Color.Red;
}
}int.Parse(e.Value.ToString() < 0) 报错,错误 1 运算符“<”无法应用于“string”和“int”类型的操作数 C:\Users\wangxin\Documents\Visual Studio 2010\Projects\WindowsFormsApplication3\WindowsFormsApplication3\Form1.cs 43 81 WindowsFormsApplication3请问如何修改,
{
if (e.Value == null)
return;
if (发货单DataGridView.Columns[e.ColumnIndex].Name = "利润" && int.Parse(e.Value.ToString() < 0))
{
e.CellStyle.BackColor = Color.Red;
}
}int.Parse(e.Value.ToString() < 0) 报错,错误 1 运算符“<”无法应用于“string”和“int”类型的操作数 C:\Users\wangxin\Documents\Visual Studio 2010\Projects\WindowsFormsApplication3\WindowsFormsApplication3\Form1.cs 43 81 WindowsFormsApplication3请问如何修改,
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货