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. DataGrid Columns

DataGrid Columns

Scheduled Pinned Locked Moved C#
csharpdatabase
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.
  • J Offline
    J Offline
    jinksk
    wrote on last edited by
    #1

    I am new to C# and am trying to find a way to change the text displayed in a given ColumnHeader in a DataGrid. I would like to display text that is "human understandable" rather than some of the cryptic field names some folks have put in the Database. That I can determine the Columns Collection doesn't have a property that allows this. I am probably just missing it somewhere. If anyon can point me in the right direction, I would appreciate it. Thanks Ken Jinks

    M T D 3 Replies Last reply
    0
    • J jinksk

      I am new to C# and am trying to find a way to change the text displayed in a given ColumnHeader in a DataGrid. I would like to display text that is "human understandable" rather than some of the cryptic field names some folks have put in the Database. That I can determine the Columns Collection doesn't have a property that allows this. I am probably just missing it somewhere. If anyon can point me in the right direction, I would appreciate it. Thanks Ken Jinks

      M Offline
      M Offline
      miah alom
      wrote on last edited by
      #2

      Check this site for DataGrid queries. http://www.syncfusion.com/FAQ/WindowsForms/FAQ_c44c.aspx

      1 Reply Last reply
      0
      • J jinksk

        I am new to C# and am trying to find a way to change the text displayed in a given ColumnHeader in a DataGrid. I would like to display text that is "human understandable" rather than some of the cryptic field names some folks have put in the Database. That I can determine the Columns Collection doesn't have a property that allows this. I am probably just missing it somewhere. If anyon can point me in the right direction, I would appreciate it. Thanks Ken Jinks

        T Offline
        T Offline
        Taurian110
        wrote on last edited by
        #3

        I am not an expert by any mean but the method worked best for me and was fairly easy was to use alias in the select statement, something like this:

        SELECT UID as [User ID], UNAME as [User Name], UADD as [User Address]
        FROM tblUserInfo

        Hope it will help. :)

        1 Reply Last reply
        0
        • J jinksk

          I am new to C# and am trying to find a way to change the text displayed in a given ColumnHeader in a DataGrid. I would like to display text that is "human understandable" rather than some of the cryptic field names some folks have put in the Database. That I can determine the Columns Collection doesn't have a property that allows this. I am probably just missing it somewhere. If anyon can point me in the right direction, I would appreciate it. Thanks Ken Jinks

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

          jinksk wrote: I would like to display text that is "human understandable" rather than some of the cryptic field names some folks have put in the Database. u could put column styles for the columns then give the header name as anything u want.

          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