Solved

Framework 2.0 DataGrid Change Row Color

Posted on 2006-11-14
5
240 Views
Last Modified: 2008-02-01
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,
0
Comment
Question by:justaphase
  • 2
5 Comments
 
LVL 10

Expert Comment

by:Kinger247
ID: 17937483
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.
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 17937907
That is DataGridView not Mobile 5 DataGrid.  I don't believe that you can achieve what you want with that DataGrid.  Unfortunately, you can't override the default behavior of the DataGridTextBoxColumn to do your own painting.

Bob
0
 
LVL 10

Expert Comment

by:Kinger247
ID: 17938103
Just thought the idea might be the same (ish).
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Extracting last characters in a substring 5 28
send messages to whatsapp programatically 2 49
VB: Convert 2 dates to specific format 24 48
VB.NET 1 23
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question