Solved

DataGridView keeps making headers bold when GroupBox is bold?

Posted on 2015-02-03
2
138 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

751 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