running32
asked on
DataGridView not declared
I need to loop though my datagrid and change the backgound color. I get datagridview not declared, how do I declare it? Thanks
If DataGridView.Rows(i).Cells ("locuscou nt").Value = "0" Then
DataGridView.Rows(i).Cells ("Status") .Style.Bac kColor() = Color.AliceBlue
End If
If DataGridView.Rows(i).Cells
DataGridView.Rows(i).Cells
End If
that's form, not dorm. :Þ
ASKER
How do I declare a datagridview? Thanks
Dim dataGridView1 As New DataGridView
ASKER
how do you link it to the datagrid? Thanks
If dataGridView1.Rows(i).Cell s("locusco unt").Valu e = "0" Then
dataGridView1.Rows(i).Cell s("Status" ).Style.Ba ckColor() = Color.AliceBlue
End If
---
It'd be better if we could see your code...
dataGridView1.Rows(i).Cell
End If
---
It'd be better if we could see your code...
Yeah, my crystal ball isn't working so well today. ;-)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you
it's probably datagridview1