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

GRIDVIEW

Scheduled Pinned Locked Moved ASP.NET
9 Posts 7 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.
  • G Offline
    G Offline
    GauravKP
    wrote on last edited by
    #1

    I stored FirstName and LastName in two column in table... I want to show them in a single column in gridview along with their email and other details. Any suggestion ......

    R P S V S 6 Replies Last reply
    0
    • G GauravKP

      I stored FirstName and LastName in two column in table... I want to show them in a single column in gridview along with their email and other details. Any suggestion ......

      R Offline
      R Offline
      Ravi Mori
      wrote on last edited by
      #2

      You just need to bind both columns FirstName and LastName on a single gridview column using string concatenation

      1 Reply Last reply
      0
      • G GauravKP

        I stored FirstName and LastName in two column in table... I want to show them in a single column in gridview along with their email and other details. Any suggestion ......

        P Offline
        P Offline
        Parwej Ahamad
        wrote on last edited by
        #3

        Use template column

        Parwej Ahamad ahamad.parwej@gmail.com

        1 Reply Last reply
        0
        • G GauravKP

          I stored FirstName and LastName in two column in table... I want to show them in a single column in gridview along with their email and other details. Any suggestion ......

          S Offline
          S Offline
          Suresh Suthar
          wrote on last edited by
          #4

          In you Select statement just do this..

          Select FirstName + ' ' + LastName as [Name] from table

          Be an Eagle, Sky is Yours.

          1 Reply Last reply
          0
          • G GauravKP

            I stored FirstName and LastName in two column in table... I want to show them in a single column in gridview along with their email and other details. Any suggestion ......

            V Offline
            V Offline
            Vimalsoft Pty Ltd
            wrote on last edited by
            #5

            DO this from the SQL Side and let the grid display what is comming from SQL. Dont do your manipulation in the Grid.

            Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

            G 1 Reply Last reply
            0
            • V Vimalsoft Pty Ltd

              DO this from the SQL Side and let the grid display what is comming from SQL. Dont do your manipulation in the Grid.

              Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

              G Offline
              G Offline
              GauravKP
              wrote on last edited by
              #6

              U r one of that clerks thanx

              V 1 Reply Last reply
              0
              • G GauravKP

                U r one of that clerks thanx

                V Offline
                V Offline
                Vimalsoft Pty Ltd
                wrote on last edited by
                #7

                You are Welcome :)

                Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

                1 Reply Last reply
                0
                • G GauravKP

                  I stored FirstName and LastName in two column in table... I want to show them in a single column in gridview along with their email and other details. Any suggestion ......

                  S Offline
                  S Offline
                  sohighthesky
                  wrote on last edited by
                  #8

                  you can write your sql like this: select FullName=FisrtName+LastName from your_tableName if your are using Access Database ,then it should be change: select FisrtName+LastName from your_tableName

                  1 Reply Last reply
                  0
                  • G GauravKP

                    I stored FirstName and LastName in two column in table... I want to show them in a single column in gridview along with their email and other details. Any suggestion ......

                    D Offline
                    D Offline
                    Dhruv SoluSoft
                    wrote on last edited by
                    #9

                    There are 2 sollutions : - You can use ItemTemplate with TemplateColumn. It will be useful if you want to format the contents, and you need specific control for specific content. - Going on SQL side, you can adjust the query itself to produce the firstname+lastname's combination, if you just want to display the information.

                    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