DATAGRIDVIEW SELECTED ROW

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.
LVL 1
emi_sastraAsked:
Who is Participating?
 
Deepak LakkadConnect With a Mentor Commented:
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
 
CodeCruiserCommented:
>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
 
Deepak LakkadCommented:
Hi

see following example

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

- Deepak Lakkad
0
 
emi_sastraAuthor Commented:
Hi deepaklakkad,

Great.

Thank you very much for your help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.