471,319 Members | 3,299 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,319 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 3774
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by jehugaleahsa | last post: by

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.