getting data from database and separating them
-
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
-
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
-
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
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'sDataSource
property (if it has one, like theDataGrid
), set a few other properties and that's it (in ASP.NET, it requires a call to aDataBind
method). You can data-bind just about anything, though. TheDataBindings
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