What I have is a listbox with items imported from the database. From the Data Sources (Shift+Alt+D) I've dragged a table in the form of Details, instead of DataGridView.
What I'm trying to figure out, is how to make the information to be displayed in the Details when an item is selected from the listbox.
See the picture for clarification.
Start4me
0
Newbie Poster
Recommended Answers
Jump to PostDoes the information in the Listbox (retreived by SQL Query) is using the same table shown in picture? or there is 2 (table and query)?
Jump to PostDragging data source to the form will create a bindingsource for you (Let assume that the bindingsource name is bs_detail)
Use the Find("FieldName",FieldValue) to find the required row depending on the listbox selection, so basically you should not code more that the below
I used "ID", change it to the …
All 6 Replies
samir_ibrahim
58
Junior Poster
Start4me
0
Newbie Poster
samir_ibrahim
58
Junior Poster
Start4me
0
Newbie Poster
samir_ibrahim
58
Junior Poster
Start4me
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.