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. getting data from database and separating them

getting data from database and separating them

Scheduled Pinned Locked Moved C#
databasehelpquestion
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.
  • A Offline
    A Offline
    ASGill
    wrote on last edited by
    #1

    Hi, im trying to store multiple items from a listbox / checklistbox to a column in a database.. storing them is a breeze(i think) but the tricky part is how do i retrieve them into (1) textbox(es) or (2) listbox. like below : 1. item1 2. item2 3. item3 4. item4 and so on.. instead of item1,item2,item3,item4.....and on.. do i have to use a loop or is there a better way to go about this..pls help.. CODER

    M H 2 Replies Last reply
    0
    • A ASGill

      Hi, im trying to store multiple items from a listbox / checklistbox to a column in a database.. storing them is a breeze(i think) but the tricky part is how do i retrieve them into (1) textbox(es) or (2) listbox. like below : 1. item1 2. item2 3. item3 4. item4 and so on.. instead of item1,item2,item3,item4.....and on.. do i have to use a loop or is there a better way to go about this..pls help.. CODER

      M Offline
      M Offline
      Mazdak
      wrote on last edited by
      #2

      Look for Control.DataBindings Property in MSDN. There is an example there too. Mazy "Man is different from animals in that he speculates, a high risk activity." - Edward Hoagland

      1 Reply Last reply
      0
      • A ASGill

        Hi, im trying to store multiple items from a listbox / checklistbox to a column in a database.. storing them is a breeze(i think) but the tricky part is how do i retrieve them into (1) textbox(es) or (2) listbox. like below : 1. item1 2. item2 3. item3 4. item4 and so on.. instead of item1,item2,item3,item4.....and on.. do i have to use a loop or is there a better way to go about this..pls help.. CODER

        H Offline
        H Offline
        Heath Stewart
        wrote on last edited by
        #3

        You can also find many samples of data-binding in the .NET Framework SDK, .NET Samples - Windows Forms: Data Binding[^]. Data-binding allows you to take a data source (a DataSet is a common and rich source), assign that to a control's DataSource property (if it has one, like the DataGrid), set a few other properties and that's it (in ASP.NET, it requires a call to a DataBind method). You can data-bind just about anything, though. The DataBindings property allows you to manually (not quite as easy as what I described above, but do-able) binding a control's properties to a data source. The .NET Framework provides data-binding "managers" for data sources and for properties (so you could binding two controls' properties together). See the documentation for the BindingManagerBase[^] class in the .NET Framework SDK for more information.

        Microsoft MVP, Visual C# My Articles

        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