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. DataColumn.Caption not working

DataColumn.Caption not working

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

    Hi, I have a typed dataset which I bind a DataGridView to, and I have set the caption property of the columns in my dataset. However, when binded, the datagridview is showing the ColumnName value, not the Caption. Am I doing something wrong? I thought that setting Caption would make the DataGridView use it. Sorry if this has been asked before, search didnt yield any results :~

    L E 2 Replies Last reply
    0
    • C Chals

      Hi, I have a typed dataset which I bind a DataGridView to, and I have set the caption property of the columns in my dataset. However, when binded, the datagridview is showing the ColumnName value, not the Caption. Am I doing something wrong? I thought that setting Caption would make the DataGridView use it. Sorry if this has been asked before, search didnt yield any results :~

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      Try setting each columns header text in the DataGridView properties.

      led mike

      1 Reply Last reply
      0
      • C Chals

        Hi, I have a typed dataset which I bind a DataGridView to, and I have set the caption property of the columns in my dataset. However, when binded, the datagridview is showing the ColumnName value, not the Caption. Am I doing something wrong? I thought that setting Caption would make the DataGridView use it. Sorry if this has been asked before, search didnt yield any results :~

        E Offline
        E Offline
        ednrgc
        wrote on last edited by
        #3

        So, you've created the columns, and not AutoGenerated them?

        C 1 Reply Last reply
        0
        • E ednrgc

          So, you've created the columns, and not AutoGenerated them?

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

          Nope, columns are all autogenerated, but the header text displays the column name, not the value set in the caption property...and according to help, caption should be displayed.

          E 1 Reply Last reply
          0
          • C Chals

            Nope, columns are all autogenerated, but the header text displays the column name, not the value set in the caption property...and according to help, caption should be displayed.

            E Offline
            E Offline
            ednrgc
            wrote on last edited by
            #5

            The easy way is to make templated columns, and not autogen.

            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