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 Column Caption Problem While Binding Data

Datagrid Column Caption Problem While Binding Data

Scheduled Pinned Locked Moved C#
csharpasp-netwpfwcfhelp
3 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.
  • T Offline
    T Offline
    theprofound
    wrote on last edited by
    #1

    In asp.net When you bind data to datagrid it automatically assigns the header text of columns with the binding source fields. lets say my first field name is firstName and it displays as it is in the datagrid's column header text.But i want "First Name" instead of firstName.How could i achieve that without introducing some new table or with doing extra work.Keep in mind i dun wanna disturp the order of the colums????

    N 1 Reply Last reply
    0
    • T theprofound

      In asp.net When you bind data to datagrid it automatically assigns the header text of columns with the binding source fields. lets say my first field name is firstName and it displays as it is in the datagrid's column header text.But i want "First Name" instead of firstName.How could i achieve that without introducing some new table or with doing extra work.Keep in mind i dun wanna disturp the order of the colums????

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      Go to datagrids property bulider page and set the column header there

      Cheers Navaneeth!!

      T 1 Reply Last reply
      0
      • N N a v a n e e t h

        Go to datagrids property bulider page and set the column header there

        Cheers Navaneeth!!

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

        well but doing so disturbs the order of binding source columns...lets say i have 3 fields id firstName n lastName and my colum names "ID", "First Name" n "Last Name". After binding it assigns field without any order against ID it binds fiestName field so on n so forth.

        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