473,382 Members | 1,442 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.

Winforms User Controls - How do I bind those to a dataset on the host form

Hello there,

I have a dataset on a form...I shall call the host form.
I also have a user control with a whole bunch of textboxes and
gridviewcontrols on it. I shall call this the leech form.

I want the controls on the leech form to get bound to a dataset and/or
binding sources that reside on the host form.

At the moment I just pass in the dataset by reference to the user control
but this seems like a bit of a cludge...Does anyone have any thoughts on the
best way to go about doing this?

Thank you kindly for your time
John Sheppard
Jun 27 '08 #1
2 1516
"John Sheppard" <sp**@nospam.comwrote in message
news:fu*********@news2.newsguy.com...
Hello there,

I have a dataset on a form...I shall call the host form.
I also have a user control with a whole bunch of textboxes and
gridviewcontrols on it. I shall call this the leech form.

I want the controls on the leech form to get bound to a dataset and/or
binding sources that reside on the host form.

At the moment I just pass in the dataset by reference to the user control
but this seems like a bit of a cludge...Does anyone have any thoughts on
the best way to go about doing this?

Thank you kindly for your time
John Sheppard
You would have to go into your user control and create a mechanism whereby
all data binding properties of the constituent controls are exposed in the
user control. Frankly, IMHO, passing a reference to the dataset sounds much
easier.

Jun 27 '08 #2

"PvdG42" <pv**@toadstool.eduwrote in message
news:OA**************@TK2MSFTNGP02.phx.gbl...
"John Sheppard" <sp**@nospam.comwrote in message
news:fu*********@news2.newsguy.com...
>Hello there,

I have a dataset on a form...I shall call the host form.
I also have a user control with a whole bunch of textboxes and
gridviewcontrols on it. I shall call this the leech form.

I want the controls on the leech form to get bound to a dataset and/or
binding sources that reside on the host form.

At the moment I just pass in the dataset by reference to the user control
but this seems like a bit of a cludge...Does anyone have any thoughts on
the best way to go about doing this?

Thank you kindly for your time
John Sheppard

You would have to go into your user control and create a mechanism whereby
all data binding properties of the constituent controls are exposed in the
user control. Frankly, IMHO, passing a reference to the dataset sounds
much easier.
Thank you PvdG42...yes it is easy, I guess I always feel as though there has
to be a better way...I guess I was after reassurance that this is how other
people do it...

One particular problem I'm having with this method is that my binding
sources that reside on my leech form doesn't seem to be happy with the
referenced dataset. Still trying to figure that one out...:(

Thank you
John Sheppard
Jun 27 '08 #3

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

Similar topics

2
by: David Adams | last post by:
Hi, I am afraid I am asking a very basic question, or just something that is not possible. I have a WinForm app that contains a Form (Form A), and then 20-30 UserControls/WinForms that are...
10
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ...
2
by: Dan | last post by:
All, I have a windows form application. The form will host various user controls that will implement an interface so that was new controls can be added later without recompiling the hosting...
5
by: Segfahlt | last post by:
I need a little help here please. I have 2 win forms user controls in 2 different projects that I'm hosting in 2 different virtual directories. The controls have been test and operate okay in...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.