Solved

Framework 2.0 DataGrid Change Row Color

Posted on 2006-11-14
5
243 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

695 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