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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Inscrease width of columns in datagrid

Inscrease width of columns in datagrid

Scheduled Pinned Locked Moved C / C++ / MFC
csswpfwcfquestion
4 Posts 2 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.
  • C Offline
    C Offline
    cppdotnet
    wrote on last edited by
    #1

    I have this datagrid with I am binding with data set ... I am not using all the columns from table I am bounding with 5 columns only ... How do i increase the length of coulmns in datagrid ... so it looks good on page .. currrunly i have 5 columns in data grid .. all on left side ... data does wrap .. Thanks

    C 1 Reply Last reply
    0
    • C cppdotnet

      I have this datagrid with I am binding with data set ... I am not using all the columns from table I am bounding with 5 columns only ... How do i increase the length of coulmns in datagrid ... so it looks good on page .. currrunly i have 5 columns in data grid .. all on left side ... data does wrap .. Thanks

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      boundColumn.ItemStyle.Width = Unit.Percentage(somePercent); or boundColumn.ItemStyle.Width = somePixels; Cleek | Image Toolkits | Thumbnail maker

      C 1 Reply Last reply
      0
      • C Chris Losinger

        boundColumn.ItemStyle.Width = Unit.Percentage(somePercent); or boundColumn.ItemStyle.Width = somePixels; Cleek | Image Toolkits | Thumbnail maker

        C Offline
        C Offline
        cppdotnet
        wrote on last edited by
        #3

        DataGrid1.DataSource = tempDs.Tables["Personnel"].DefaultView ; I am setting columns in Property builder which doesn't have property to set width ... How do I do it? Thanks

        C 1 Reply Last reply
        0
        • C cppdotnet

          DataGrid1.DataSource = tempDs.Tables["Personnel"].DefaultView ; I am setting columns in Property builder which doesn't have property to set width ... How do I do it? Thanks

          C Offline
          C Offline
          cppdotnet
          wrote on last edited by
          #4

          DataGrid1.Columns[0].ItemStyle.Width = 100; DataGrid1.Columns[1].ItemStyle.Width = 300; doesn't work 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