Solved

DataGridView keeps making headers bold when GroupBox is bold?

Posted on 2015-02-03
2
124 Views
Last Modified: 2015-02-05
I have 2 sets of GroupBoxes with a DataGridView in each one of them on a Windows Form. I have one set to where the DGV column headers are NOT bold regardless is the GB is bold or not.

For some reason I can't get the other one to act the same way.

In design mode, I basically make the GB bold, then, for the DGV, I set the "bold" property to False for the "ColumnHeadersDefaultCellStype", "DefaultCellStyle" and "RowHeadersDefaultCellStyle". Once that's done, I go back and set the GB's "bold" property to False. This still isn't working and I have no idea what else to do.
0
Comment
Question by:BlakeMcKenna
2 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 40590742
Inheriting associative styles from the parent container is the expected behaviour, so it is doing what it is supposed to do.

The simplest way to fix it would be to add a Panel control the the GB and put the DataGridView in that, thus changing the parent container from the GB to the Panel.  You can then switch off bold for the Panel and that should reflect in the DataGridView.
0
 

Author Closing Comment

by:BlakeMcKenna
ID: 40591327
Thanks Carl...that worked!
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

760 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

19 Experts available now in Live!

Get 1:1 Help Now