?
Solved

Databinding dataset with multiple tables to textboxes

Posted on 2005-02-28
1
Medium Priority
?
344 Views
Last Modified: 2008-02-20

I have a bunch of text boxes that I would like to databind to a dataset that has two tables with a one to many relationship between them.  I am using the bindingcontext to navigate through the rows of the master table, which nicely scrolls through the data and displays it in the textboxes that are bound to the Master table.  However, I have other textboxes that I would like bound to the child table to display a value that has a relationship to the master.  

Is this possible through databinding?  if not Could someone expain how to do this??

 
0
Comment
Question by:leonardjp
[X]
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
1 Comment
 
LVL 34

Accepted Solution

by:
Brian Crowe earned 1000 total points
ID: 13422524
create a dataview of your child table and bind to that instead of the datatable
use the dataview.rowfilter property to control what record(s) are viewable.

dim dv as new dataview(childtable)
dv.rowfilter = "FKID = " + dtMaster.rows(currentrecord).item("PKID").tostring
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month12 days, 13 hours left to enroll

777 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