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. C#
  4. Preventing DataGridView column from auto-resizing when double-clicking the column header divider

Preventing DataGridView column from auto-resizing when double-clicking the column header divider

Scheduled Pinned Locked Moved C#
question
4 Posts 3 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.
  • E Offline
    E Offline
    eyalbi007
    wrote on last edited by
    #1

    Hi all, I have a DataGridView where the user can change the columns widths (by dragging the column header divider). However, I'd like to disable the functionality that double-clicking the column header divider auto-resizes the column with. I tried using the ColumnDividerDoubleClick event to handle this event manually, but the column width still automatically resizes. Ideas? Thanks! Eyal.

    E N 2 Replies Last reply
    0
    • E eyalbi007

      Hi all, I have a DataGridView where the user can change the columns widths (by dragging the column header divider). However, I'd like to disable the functionality that double-clicking the column header divider auto-resizes the column with. I tried using the ColumnDividerDoubleClick event to handle this event manually, but the column width still automatically resizes. Ideas? Thanks! Eyal.

      E Offline
      E Offline
      eyalbi007
      wrote on last edited by
      #2

      ...

      OriginalGriffO 1 Reply Last reply
      0
      • E eyalbi007

        ...

        OriginalGriffO Offline
        OriginalGriffO Offline
        OriginalGriff
        wrote on last edited by
        #3

        It is a Sunday, so most of Europe is not at work. It is also sunny and hot in the UK, so most people are out in the fresh air, warming and drying out after a long cold winter. Some are trying to work out what that big, hot, yellow thing up there is, since we haven't seen it for a couple of years... Normal service will resume tomorrow. Probably. If the warm weather doesn't encourage too much beer drinking, with resulting spontaneous-Monday-morning-illness problems. It might.

        Did you know: That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
        "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

        1 Reply Last reply
        0
        • E eyalbi007

          Hi all, I have a DataGridView where the user can change the columns widths (by dragging the column header divider). However, I'd like to disable the functionality that double-clicking the column header divider auto-resizes the column with. I tried using the ColumnDividerDoubleClick event to handle this event manually, but the column width still automatically resizes. Ideas? Thanks! Eyal.

          N Offline
          N Offline
          nicos28
          wrote on last edited by
          #4

          Hello did you found any answer for this? Thanks.

          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