I have a weird problem, and I don't know if this is the default behaviour of .Net DataGridView inside a GroupBox/TabControl.
I've created a new WinForm project from scratch, and created a GroupBox(changed the text style). Like this:
alt text http://www.freeimagehosting.net/uploads/65f5f2762d.png
Then, I've created a simple DataGridView, no font style at all, like this:
alt text http://www.freeimagehosting.net/uploads/09f55f951a.png
Then, in design mode, I dragged the DataGridView inside the GroupBox, and this sort of magic just happened:
alt text http://www.freeimagehosting.net/uploads/d0334132f0.png
My question is, can I disable this behaviour? Cause if I chage the DataGridView style outside the GroupBox and then drag it into, lost all the style.
Just for the record, this form has NO CODE at all.
Thanks in advance.
Try putting a panel in the group box, then setting the font property of the panel. This way the DataGridView will inherit the properties of the panel. Much easier than setting every font property of the DataGridView.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With