473,382 Members | 1,225 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,382 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 3889
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....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.