返回首页

我要设置从DataTable值的DataGridView行的背景色。


Dim strColor As String = DataGrigView1.CurrentRow.Cells("CalColor").Value.ToString()

grdJobTracking.CurrentRow.DefaultCellStyle.SelectionBackColor = System.Drawing.Color.FromArgb(strColor)

 

但在这里,它抛出一个错误消息

从"红楼梦",键入"整数"的字符串转换是无效的。

我怎么可以设置网格的背景色。

谢谢!

kuldeep Dwivedi

回答

评论会员:S 时间:2