Solved

DATAGRIDVIEW SELECTED ROW

Posted on 2013-06-25
4
478 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

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

679 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