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. Datagrid Colunm Header

Datagrid Colunm Header

Scheduled Pinned Locked Moved ASP.NET
csharpcomtutorial
4 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.
  • M Offline
    M Offline
    Muhammad Waqas Butt
    wrote on last edited by
    #1

    How to change Datagrid Header Text through programming in C#.net. and how to set colunm width and height. How to format date in datagrid column. and I want to highlight row where cell fee value = 0;

    |Muhamad Waqas Butt| waqasb4all@yahoo.com www.sktech.freewebspace.com

    G A 2 Replies Last reply
    0
    • M Muhammad Waqas Butt

      How to change Datagrid Header Text through programming in C#.net. and how to set colunm width and height. How to format date in datagrid column. and I want to highlight row where cell fee value = 0;

      |Muhamad Waqas Butt| waqasb4all@yahoo.com www.sktech.freewebspace.com

      G Offline
      G Offline
      Gamzun
      wrote on last edited by
      #2

      there no property name HeaderText :P and about columns widht n height use cellspacind and cellpadding

      1 Reply Last reply
      0
      • M Muhammad Waqas Butt

        How to change Datagrid Header Text through programming in C#.net. and how to set colunm width and height. How to format date in datagrid column. and I want to highlight row where cell fee value = 0;

        |Muhamad Waqas Butt| waqasb4all@yahoo.com www.sktech.freewebspace.com

        A Offline
        A Offline
        arslanjatt
        wrote on last edited by
        #3

        I think u want to set the header text of column. any ways here is the solution. DataGrid.Column[Column Index].HeaderText = "ColumnName"; gv.Columns[1].HeaderStyle.Width=300; //this is in pixels. and let me know what kind of formating do u want and the last one i can't understand u want to ask. Regards, Arslan

        M 1 Reply Last reply
        0
        • A arslanjatt

          I think u want to set the header text of column. any ways here is the solution. DataGrid.Column[Column Index].HeaderText = "ColumnName"; gv.Columns[1].HeaderStyle.Width=300; //this is in pixels. and let me know what kind of formating do u want and the last one i can't understand u want to ask. Regards, Arslan

          M Offline
          M Offline
          Manas Bhardwaj
          wrote on last edited by
          #4

          You can set DataFormatString="{0:d}"

          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