Link to home
Start Free TrialLog in
Avatar of justaphase
justaphaseFlag for Portugal

asked on

Framework 2.0 DataGrid Change Row Color

Hi,

Im trying to change the color of a row in a DataGrid object. I dont want to change it acording to values in cells, i wish to change the color of the entire row at a given time at runtime.

Im having dificulties becouse this DataGrid object doenst have the common propreties and methods i can find in a regular vb application. This code is to be used in a Device Aplication to a Pocket PC in a Mobile 5 enviorment.

Thank you in advance,
Avatar of Kinger247
Kinger247

I'm using vs2005, and to do this I would do something like :

        Dim iRow As Integer = 1
        For iCol As Integer = 0 To DataGridView.Rows(iRow).Cells.Count - 1
            DataGridView.Rows(iRow).Cells(iCol).Style.BackColor = Color.Aqua
        Next

Don't know about the pocket pc version though,
Hope this helps.
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Just thought the idea might be the same (ish).