Solved

DATAGRIDVIEW SELECTED ROW

Posted on 2013-06-25
4
468 Views
Last Modified: 2013-06-25
Hi All,

I have a datagridview, it has alternatingrows says :

Odd row : Black on White
Even Row : Black on Light Blue
Selected Row : White On Orange

When a row is selected, the color at Odd and Even Row are different.
I want they have the same color on selected, which is White On Orange.

How could I do it ?

Thank you.
0
Comment
Question by:emi_sastra
  • 2
4 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39274563
>When a row is selected, the color at Odd and Even Row are different.

You mean the colour switches odd to even and even to odd? Is that above the selected row or below or both?
0
 
LVL 11

Expert Comment

by:Deepak Lakkad
ID: 39274639
Hi

see following example

http://www.dotnetperls.com/datagridview-row-colors-alternating

- Deepak Lakkad
0
 
LVL 11

Accepted Solution

by:
Deepak Lakkad earned 500 total points
ID: 39274646
Following link also has good example for setting appearance of DataGridView including Alternate rows:

http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.alternatingrowsdefaultcellstyle.aspx
0
 
LVL 1

Author Closing Comment

by:emi_sastra
ID: 39276775
Hi deepaklakkad,

Great.

Thank you very much for your help.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 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

23 Experts available now in Live!

Get 1:1 Help Now