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. LINQ
  4. Combobox binding using LINQ

Combobox binding using LINQ

Scheduled Pinned Locked Moved LINQ
databasecsharpsql-serverwpfwcf
1 Posts 1 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.
  • N Offline
    N Offline
    Nilish
    wrote on last edited by
    #1

    Hi , I am presently doing the following thing using sql server 2005. I have the populate the combo box with a table which has two fields id and name even if there exist no record in database for that table , it shall return me the clone of that table. and after retrieving the records and put into the datatable , i add one more row at first place (---Select---) in the datatable , and finally bind it with the combo box control. I want to do the samething in LINQ , I am able to populate it with combo box using Linq , but i am facing two problems (a) If there exist no record , in this case how should i place the (---Select---) row at first place , this is the mandatory record. (b) If there exist records , even then i am unable to attach the (---Select--) row in the combo box at first place. Regards

    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