Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Simple data binding way in Windows Form?

Posted on 2006-10-24
2
185 Views
Last Modified: 2010-04-23
Simple question, but i need the answer urgently. Thanks. Anybody can give me some sample code on simple data binding without using dataset? Say, I have a form with one combo box, two text fields. The data of the combobox can be binded to an arraylist, say, library name, and the two fields will be populated the corresponding library code, address, etc. Library name, library ID, library address come from the same table. What are the choices of implementing this without using dataset? Anybody can give me some links or code samples on this?
0
Comment
Question by:heyday2004
2 Comments
 
LVL 17

Accepted Solution

by:
ZeonFlash earned 500 total points
ID: 17800883
Seems like you're going to a lot of trouble avoiding the usage of the standard technique, so we might be able to answer better if you can explain why you DON'T want to use a dataset.

But to answer a portion of your question, you can bind a combobox to an ArrayList just as you would a dataset:

    Dim al As New ArrayList

        al.Add("a")
        al.Add("b")
        al.Add("c")

     ComboBox1.DataSource = al
0
 

Author Comment

by:heyday2004
ID: 17801112
how to populate to other text boxes after selecting from the combo box? the records are from a query like: select library_name, library_id, address from library

thanks.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question