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. Visual Basic
  4. Change Column width from Datagridview without dataset

Change Column width from Datagridview without dataset

Scheduled Pinned Locked Moved Visual Basic
questiondatabasealgorithmshelptutorial
5 Posts 4 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.
  • D Offline
    D Offline
    DeDelva
    wrote on last edited by
    #1

    Hellow code friends, I was searching 4 a while after my question but most of the time i find answers with a dataset. I'm getting my data from a DB (without envolving a dataset). So My 4th column or column called opmerkingen is to small in width. I just want to set my with to 80 or something when my datagridview is loaded. Can anyone solve my problem in a simple way?? If you answer please do this with an example. there is nothing more clear then an ex... Thx in advance Greetings from a n00b

    D L D 3 Replies Last reply
    0
    • D DeDelva

      Hellow code friends, I was searching 4 a while after my question but most of the time i find answers with a dataset. I'm getting my data from a DB (without envolving a dataset). So My 4th column or column called opmerkingen is to small in width. I just want to set my with to 80 or something when my datagridview is loaded. Can anyone solve my problem in a simple way?? If you answer please do this with an example. there is nothing more clear then an ex... Thx in advance Greetings from a n00b

      D Offline
      D Offline
      David C Hobbyist
      wrote on last edited by
      #2

      Hi not sure you googled correctly. This will help it helped me. How to Use Google and Other Tips for Finding Programming Help[^]

      Frazzle the name say's it all

      1 Reply Last reply
      0
      • D DeDelva

        Hellow code friends, I was searching 4 a while after my question but most of the time i find answers with a dataset. I'm getting my data from a DB (without envolving a dataset). So My 4th column or column called opmerkingen is to small in width. I just want to set my with to 80 or something when my datagridview is loaded. Can anyone solve my problem in a simple way?? If you answer please do this with an example. there is nothing more clear then an ex... Thx in advance Greetings from a n00b

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        myDGV.Columns[3].Width=80; // or something

        or even maybe (once populated):

        myDGV.AutoResizeColumns();

        :)

        Luc Pattyn [My Articles] Nil Volentibus Arduum

        D 1 Reply Last reply
        0
        • L Luc Pattyn

          myDGV.Columns[3].Width=80; // or something

          or even maybe (once populated):

          myDGV.AutoResizeColumns();

          :)

          Luc Pattyn [My Articles] Nil Volentibus Arduum

          D Offline
          D Offline
          DeDelva
          wrote on last edited by
          #4

          Thx mate After populating : DataGridView1.AutoResizeColumns() Did the trick... greetz

          1 Reply Last reply
          0
          • D DeDelva

            Hellow code friends, I was searching 4 a while after my question but most of the time i find answers with a dataset. I'm getting my data from a DB (without envolving a dataset). So My 4th column or column called opmerkingen is to small in width. I just want to set my with to 80 or something when my datagridview is loaded. Can anyone solve my problem in a simple way?? If you answer please do this with an example. there is nothing more clear then an ex... Thx in advance Greetings from a n00b

            D Offline
            D Offline
            DaveAuld
            wrote on last edited by
            #5

            You might find my Tip useful, DataGridView Column Width Grow Only Sizing[^]

            Dave Find Me On: Web|Facebook|Twitter|LinkedIn


            Folding Stats: Team CodeProject

            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