473,231 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

bindingsource

Hi All,

I have two pagetabs. One pagetab is used to display a parent record and the
other is suppose to display 3 related child records from another table.
I can display the parent records just fine by using the bindingSource and a
tableAdapter to fill the dataset. I'm having a problem displaying the 3
related records on the other pagetab. I can only bind to one record and have
the bindingsource populate one set of databound contorls. I can't use a
grid and are using the detailed mode to drag data over from the data source.
I have one bindingSource control on the child pagetab. Is it possible to
have one bindingSource control bind three sets of databound controls and
have all three records displayed at the same time? If so, how?
TIA for any of your time.
rich
Dec 20 '05 #1
3 3884
silesius wrote:
Hi All,

I have two pagetabs. One pagetab is used to display a parent record
and the other is suppose to display 3 related child records from
another table. I can display the parent records just fine by using
the bindingSource and a tableAdapter to fill the dataset. I'm having
a problem displaying the 3 related records on the other pagetab. I
can only bind to one record and have the bindingsource populate one
set of databound contorls. I can't use a grid and are using the
detailed mode to drag data over from the data source. I have one
bindingSource control on the child pagetab. Is it possible to have
one bindingSource control bind three sets of databound controls and
have all three records displayed at the same time? If so, how? TIA
for any of your time. rich


The bindingsource has one datasource object, which should be your
dataset (with 4 tables: 1 for the main table and 3 for each child
table), and can be bound to various controls at once. At the controls
(the grids) you select the DataMEMBER from the datasource (which is the
bindingsource). So in the grids for the childs, you select per grid the
childtable you want to display there.

Frans

--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Dec 20 '05 #2
Thanks for your reply Frans,
I have only two tables. I'm displaying one record from one table and have to
display 3 child records from the second table. So it's a master-detail w/o
the use of a grid control. I need to have three sets of databound controls
with each set holding data from 3 rows in the same table. I know how to do
this the traditional way (contorl.databindins.add() ) but can't figure out
how can I make use of the bindingsource object to display the rows at the
same time on the screen in three sets.
rich
Dec 20 '05 #3
silesius wrote:
Thanks for your reply Frans,
I have only two tables. I'm displaying one record from one table and
have to display 3 child records from the second table. So it's a
master-detail w/o the use of a grid control. I need to have three
sets of databound controls with each set holding data from 3 rows in
the same table. I know how to do this the traditional way
(contorl.databindins.add() ) but can't figure out how can I make use
of the bindingsource object to display the rows at the same time on
the screen in three sets. rich


My obvious thought was/is that you should bind the same bindingsource
to the 3 sets of controls for the child records. The bindingsource is
the datasource you should bind to, and IMHO you should just bind the
textboxes to the bindingsource as if you were doing it directly to the
datatable. But perhaps I misunderstand what you're working with (the
screensetup)

FB

--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Dec 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: TN | last post by:
I just don't get the BindingSource class when it is bound to a class. Consider this code snip: ..... Private bSource As New BindingSource() Private dgv As New DataGridView() Public Sub New()...
0
by: Geoff | last post by:
Hi folks Calling BindingSource.ResetCurrentItem() is changing the BindingSource.Position in a way I don't understand. If I'm understanding the docs correctly, ResetCurrentItem() should simply...
5
by: Rob Dob | last post by:
Hi, I have two c# Winforms. the first form has a datagridview who's datasource is a bindingsource. when you double click on a datagridview row it then opens my second form, which has some...
4
by: shibeta | last post by:
Hello, I have problem with DataGridView and BindingSource. I have created DataSet and added TableData to it with manualy created columns (without DataAdapter - I'm not using MSSQL). On the Form I...
7
by: Mike | last post by:
i have a small difficulties with BindingSource and dataGridView bind db has properly opened and bind doesn't works. Unfortunately I didn't find any good example how to connect MS Access with...
0
nev
by: nev | last post by:
Hello all. I would like to place code when bindingsource is being filtered. I have tried placing it in the positionchanged and listchanged event. But, when I try to filter the bindingsource, it...
2
by: jehugaleahsa | last post by:
Hello: I'm working on improving some of our Windows Forms. I have created two user controls that I want to bind to the same BindingSource. I have an overview control that is used just to...
5
by: jehugaleahsa | last post by:
Hello: I am sure this question comes up a lot. I need to disable the controls on my Windows forms so that when the BindingSource is empty some the controls bound to it will be disabled. This...
2
by: TamusJRoyce | last post by:
I am working on a group project where I do not have access to a BindingSource that is being passed through a function. The BindingSource's DataSource is set to a custom IBindingListView Collection....
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.