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. Multi Column in a DropDown

Multi Column in a DropDown

Scheduled Pinned Locked Moved ASP.NET
csharpasp-net
11 Posts 5 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.
  • A Offline
    A Offline
    Ajeet mittal
    wrote on last edited by
    #1

    Hi, My project is in asp.net 2.0 with c#. In my project I have to display Multi Column in a single dropdown. like name and address on one dropdown. Can any one tell me how i can do it. thanks

    S A B 3 Replies Last reply
    0
    • A Ajeet mittal

      Hi, My project is in asp.net 2.0 with c#. In my project I have to display Multi Column in a single dropdown. like name and address on one dropdown. Can any one tell me how i can do it. thanks

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      Check This MultiColum Dropdown List in Codeproject[^]

      cheers, Abhijit

      A 1 Reply Last reply
      0
      • A Ajeet mittal

        Hi, My project is in asp.net 2.0 with c#. In my project I have to display Multi Column in a single dropdown. like name and address on one dropdown. Can any one tell me how i can do it. thanks

        S Offline
        S Offline
        Sherin Iranimose
        wrote on last edited by
        #3

        Multi column in asp.net Dropdown[^]

        E 1 Reply Last reply
        0
        • S Sherin Iranimose

          Multi column in asp.net Dropdown[^]

          E Offline
          E Offline
          eyeseetee
          wrote on last edited by
          #4

          I call it a draw between the two of you!! I would prefer to use the listbox as the multi column dropdwonlist isnt a custom control

          S A 2 Replies Last reply
          0
          • A Abhijit Jana

            Check This MultiColum Dropdown List in Codeproject[^]

            cheers, Abhijit

            A Offline
            A Offline
            Ajeet mittal
            wrote on last edited by
            #5

            Thanks for replying me. i gone through that articles. but i wont get solution exectly. as they uses third party control. also with that control i am unable to bind text value field. actully i have to show some text and during saving it to data base i have to store value which is index field. with third party control i am not getting it. so that i am unable to solve my problem. can u please help me.

            E 1 Reply Last reply
            0
            • A Ajeet mittal

              Thanks for replying me. i gone through that articles. but i wont get solution exectly. as they uses third party control. also with that control i am unable to bind text value field. actully i have to show some text and during saving it to data base i have to store value which is index field. with third party control i am not getting it. so that i am unable to solve my problem. can u please help me.

              E Offline
              E Offline
              eyeseetee
              wrote on last edited by
              #6

              I dotn think there is another way to do it The dropdowlist is not really designed for multi columsn. Why not try a different method like a listbox?

              1 Reply Last reply
              0
              • E eyeseetee

                I call it a draw between the two of you!! I would prefer to use the listbox as the multi column dropdwonlist isnt a custom control

                A Offline
                A Offline
                Ajeet mittal
                wrote on last edited by
                #7

                Can u tell me how i can show it with list box.

                1 Reply Last reply
                0
                • E eyeseetee

                  I call it a draw between the two of you!! I would prefer to use the listbox as the multi column dropdwonlist isnt a custom control

                  S Offline
                  S Offline
                  Sherin Iranimose
                  wrote on last edited by
                  #8

                  Yes you are right... And There are 100s ways doing this. Did you check the answer,That I've given? :)

                  E A 2 Replies Last reply
                  0
                  • S Sherin Iranimose

                    Yes you are right... And There are 100s ways doing this. Did you check the answer,That I've given? :)

                    E Offline
                    E Offline
                    eyeseetee
                    wrote on last edited by
                    #9

                    What do you mean? :)

                    1 Reply Last reply
                    0
                    • A Ajeet mittal

                      Hi, My project is in asp.net 2.0 with c#. In my project I have to display Multi Column in a single dropdown. like name and address on one dropdown. Can any one tell me how i can do it. thanks

                      B Offline
                      B Offline
                      Blue_Boy
                      wrote on last edited by
                      #10

                      I suggest you to select multiple columns in t-sql statement and cast as single column,then bind dropdownlist with that query. Example: T-SQL Query Select column1+' '+ Column2+' ' +column3 as MultipleColumns from TableName Binding DropDownList DropDownList1.DataValueField = "ColumnName"; DropDownList1.DataTextField = "MultipleColumns "; Hope this will give you an idea.


                      I Love T-SQL "Don't torture yourself,let the life to do it for you."

                      1 Reply Last reply
                      0
                      • S Sherin Iranimose

                        Yes you are right... And There are 100s ways doing this. Did you check the answer,That I've given? :)

                        A Offline
                        A Offline
                        Ajeet mittal
                        wrote on last edited by
                        #11

                        Thanks For replying me. I did check it. but my problem is not solved. if possible tell me solution. thanks

                        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