Solved

DATAGRIDVIEW SELECTED ROW

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

911 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

20 Experts available now in Live!

Get 1:1 Help Now