Solved

DataGridView keeps making headers bold when GroupBox is bold?

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
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…

820 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