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. Web Development
  3. ASP.NET
  4. Gridview Column width

Gridview Column width

Scheduled Pinned Locked Moved ASP.NET
tutorial
5 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.
  • N Offline
    N Offline
    nikhil1234
    wrote on last edited by
    #1

    how to change gridview column width

    R 1 Reply Last reply
    0
    • N nikhil1234

      how to change gridview column width

      R Offline
      R Offline
      rujuc
      wrote on last edited by
      #2

      Use <ItemStyle Width="100px"></ItemStyle> for your particular column. happy coding!!!!:)

      N 1 Reply Last reply
      0
      • R rujuc

        Use <ItemStyle Width="100px"></ItemStyle> for your particular column. happy coding!!!!:)

        N Offline
        N Offline
        nikhil1234
        wrote on last edited by
        #3

        but i am binding grid at run time so how can i do that

        R 1 Reply Last reply
        0
        • N nikhil1234

          but i am binding grid at run time so how can i do that

          R Offline
          R Offline
          rujuc
          wrote on last edited by
          #4

          Try this dgTableCreator.HeaderRow.Cells[1].Width = System.Web.UI.WebControls.Unit.Pixel(50)

          J 1 Reply Last reply
          0
          • R rujuc

            Try this dgTableCreator.HeaderRow.Cells[1].Width = System.Web.UI.WebControls.Unit.Pixel(50)

            J Offline
            J Offline
            Jaiprakash M Bankolli
            wrote on last edited by
            #5

            This needs to be done in rowdatabound event for the row - dataheader .....

            Regards, Jaiprakash M Bankolli jaiprakash.bankolli@gmail.com My Blog Suggestions for me

            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