在datagrid的ondatabound事件中可以判断,比如,第一列用ID=LB1的LABEL来绑定,第二列用ID=LB2的LABEL的绑定
if cint(ctype(e.item.foundcontrol("lb1"),label).text))>cint(ctype(e.item.foundcontrol("lb1"),label).text)) then
e.item.cells(0).backcolor=system.drawing.color.red
end if
if cint(ctype(e.item.foundcontrol("lb1"),label).text))>cint(ctype(e.item.foundcontrol("lb1"),label).text)) then
e.item.cells(0).backcolor=system.drawing.color.red
end if
if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem){
if(Int32.Parse(e.Item.Cells[3].Text)>Int32.Parse(e.Item.Cells[4].Text)){
e.Item.Cells[5].BackColor = Color.Red;
}
}
高手帮我回答一下水晶报表问题?是不是我的.net visual studio 有必要重装了?
if(Int32.Parse(e.Item.Cells[6].Text)>Int32.Parse(e.Item.Cells[5].Text))“Input string was not in a correct format”???