Solved

DataGridView keeps making headers bold when GroupBox is bold?

Posted on 2015-02-03
2
142 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: 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

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 …
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

623 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