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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. DropDownList Problem

DropDownList Problem

Scheduled Pinned Locked Moved C#
helparchitecture
3 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.
  • F Offline
    F Offline
    fahiemulleh
    wrote on last edited by
    #1

    Hi All. I am using 3 tier Architecture for my application. The problem is that I am stuck while showing values in dropdownlist. On the page load event, I have written : dsTemplate ds = ((dsTemplate)obj.GetTemplateName()); DropDownList1.DataSource = ds; this.DropDownList1.DataBind(); In Dataset, I have just one column "ABC". In Dropdownlist, I want to show the values from that Dataset. Please help me in this regard.

    D C 2 Replies Last reply
    0
    • F fahiemulleh

      Hi All. I am using 3 tier Architecture for my application. The problem is that I am stuck while showing values in dropdownlist. On the page load event, I have written : dsTemplate ds = ((dsTemplate)obj.GetTemplateName()); DropDownList1.DataSource = ds; this.DropDownList1.DataBind(); In Dataset, I have just one column "ABC". In Dropdownlist, I want to show the values from that Dataset. Please help me in this regard.

      D Offline
      D Offline
      Darren D
      wrote on last edited by
      #2

      Hi, I think you just need to set the DisplayMember property. DD

      1 Reply Last reply
      0
      • F fahiemulleh

        Hi All. I am using 3 tier Architecture for my application. The problem is that I am stuck while showing values in dropdownlist. On the page load event, I have written : dsTemplate ds = ((dsTemplate)obj.GetTemplateName()); DropDownList1.DataSource = ds; this.DropDownList1.DataBind(); In Dataset, I have just one column "ABC". In Dropdownlist, I want to show the values from that Dataset. Please help me in this regard.

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        fahiemulleh wrote:

        DropDownList1

        Please tell me this is not what it's called

        fahiemulleh wrote:

        In Dataset, I have just one column "ABC".

        You mean in the first datatable in the dataset ? I think you should make ds.Tables[0] the data source.  Then set the DisplayMember to be "ABC" ( I think that's what it's called )

        Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert

        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