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. How to add String entry in the dropdown, populated with the integer data?

How to add String entry in the dropdown, populated with the integer data?

Scheduled Pinned Locked Moved ASP.NET
helptutorialquestion
2 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.
  • S Offline
    S Offline
    sinanju
    wrote on last edited by
    #1

    when i try to add the -Select- entry in the dropdown that is populated with the interger data, from the dataset. I'm getting the following error, Expected type is Int32 Any suggestion to work around.

    I 1 Reply Last reply
    0
    • S sinanju

      when i try to add the -Select- entry in the dropdown that is populated with the interger data, from the dataset. I'm getting the following error, Expected type is Int32 Any suggestion to work around.

      I Offline
      I Offline
      Ista
      wrote on last edited by
      #2

      myList.Items.Add(new ListItem("--Select--", 0); will add it but since your binding your better off to draw the DataView and add it there then sort the DataView you just extracted. DataView myDataView = DataTable.DefaultView; I dont use datatables unless my arms are tied behind my back and someone is playing powerpuff girls all day, so the syntax might be wrong. 1 line of code equals many bugs. So don't write any!!

      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