Solved

Framework 2.0 DataGrid Change Row Color

Posted on 2006-11-14
5
238 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Calculating a BCC (Xor) for a message 13 34
regex to allow alphanumeric characters and \ 2 26
System32Int Error 8 44
Hide Tab Page 3 20
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now