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. C#
  4. Populate checkbox from database C#

Populate checkbox from database C#

Scheduled Pinned Locked Moved C#
csharpdatabasecomdesignhelp
2 Posts 2 Posters 1 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.
  • B Offline
    B Offline
    berrymaria
    wrote on last edited by
    #1

    Hi All, Beginner C# programmer here, I am creating a survey project and I was stuck on how will I populate my check boxes. I have a Table/data stored like this.

    id_no prodTyp_Code SN_Skill1 SN_Skill2 SN_Others SN_ProdTyp
    12345 T-Shirt 1 0 null null
    12345 Jacket 1 1 null null
    12345 Shorts 1 1 null null
    12345 Pants 0 0 null null

    I don't know how will I populate it to my UI. (Please see below image) My Checkboxes UI[^] Please advise me. Thank you.

    P 1 Reply Last reply
    0
    • B berrymaria

      Hi All, Beginner C# programmer here, I am creating a survey project and I was stuck on how will I populate my check boxes. I have a Table/data stored like this.

      id_no prodTyp_Code SN_Skill1 SN_Skill2 SN_Others SN_ProdTyp
      12345 T-Shirt 1 0 null null
      12345 Jacket 1 1 null null
      12345 Shorts 1 1 null null
      12345 Pants 0 0 null null

      I don't know how will I populate it to my UI. (Please see below image) My Checkboxes UI[^] Please advise me. Thank you.

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      Assuming your checkboxes are for SN_Skill1 and SN_Skill2, when you read your data in a simple boolean conversion will give you a field that is a more meaningful check value.

      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