malanois
asked on
Change Datgrid BackColor
Is there a way to change the text or the back color of a specifc row in a datagrid after it was already filled and binded.
Example
datagrid1.row(6).backcolor = red
or
datagrid1.row(5).textforec olor = blue
Any help would be great.
malanois
Example
datagrid1.row(6).backcolor
or
datagrid1.row(5).textforec
Any help would be great.
malanois
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
OK, I have the class created.
I am trying to follow your code above. I see that you are manually filling the datagrid, my grid is already filled.
Using the above
how would i change the backcolor of row 3 in the grid. From there i can figure out how to change the other specific rows.
Thank You,
Malanois
I am trying to follow your code above. I see that you are manually filling the datagrid, my grid is already filled.
Using the above
how would i change the backcolor of row 3 in the grid. From there i can figure out how to change the other specific rows.
Thank You,
Malanois
Check this sub
Private Sub dg_TextChanged(ByVal sender As Object, ByVal e As EventArgs)
...........
If newValue <> oldValue Then
GetEmbeddedDGTextBox(dgcc. ColumnNumb er).AddRow = Me.dg.CurrentRowIndex
End If
End Sub
add if statement if the col# = whatever and it will work for every row but only for the specified column
Private Sub dg_TextChanged(ByVal sender As Object, ByVal e As EventArgs)
...........
If newValue <> oldValue Then
GetEmbeddedDGTextBox(dgcc.
End If
End Sub
add if statement if the col# = whatever and it will work for every row but only for the specified column
ASKER
I dont want the columns in every row to change. I want row 2 (Or whatever row number I choose) and all columns in that row to change. It is the opposite of this code. I think
malanois
malanois
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Now If I can follow this it would be good.
MJ