Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. multiline column headers in a windows forms datagrid

multiline column headers in a windows forms datagrid

Scheduled Pinned Locked Moved .NET (Core and Framework)
questionwinformstutoriallearning
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    ricardojb
    wrote on last edited by
    #1

    I know this question has been asked many times and althought I have browsed through several message boards, I can see the question but not the answers. Because of that, I tried to figure out which method or methods the datagrid has to paint the column headers. Using reflection I found out that there are two methods: PaintColumnHeaders and PaintColumnHeaderText. However, this methods are private and can't be overridden or hidden. I can't understand why they made these methods private but anyway, does anyone know how to go around this? also, there is a private method that returns the header rectangle. I was able using the MethodInfo.Invoke method to get this object but I can't do anything with it. I am just learning to use the Reflection namespace I haven't figured out how to deal with this, any ideas?

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups