Databinding questions

G

Guest

Hi Al

When I have a text box, list box, and a datagrid, how does a CurrencyManager relate to all these controls(seeing as though the datagrid uses Complex binding and textbox and list box use simple bound. So for example if I have a text box, list box and a Datagrid on a windows form, and I want to navigate the records in a dataset(and we must not forget the child records from the child tables aswell!) How do I create the CurrencyManager to handle this navigation and how do I "bind" this currencymanager to all the controls on my form?(or is a CurrencyManager created for me?) , AND is it possible to have one control belonging to more that one CurrencyManager?

Can someone explain this to me aor provide me with links to good information about thi

I hope that my explanation was good enough to understand:

Thanks alot for any of your help on this. I just want to learn more about this "DataBinding" story,because I do not understand it very well

Kevin
 
D

Dmitriy Lapshin [C# / .NET MVP]

Hi Kevin,
How do I create the CurrencyManager to handle this navigation and how do I "bind" this currencymanager to
all the controls on my form?(or is a CurrencyManager created for me?)

It is created for you behind the scenes when you bind a control to a
datasource. Your responsibility is to specify correct DataSource and
DisplayMember (DataMember for the DataGrid control).
AND is it possible to have one control belonging to more that one
CurrencyManager?

No, but it is possible to bind several controls to the same list (determined
by the DataSource and DisplayMember property values) and all these controls
will share the same position in the list.
Can someone explain this to me aor provide me with links to good
information about this

I believe MSDN has enough information on data binding in Windows Forms.
Please refer to topics such as
"Data Binding and Windows Forms" and "Windows Forms Data Architecture" in
Visual Basic and Visual C# Concepts.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

Kevin said:
Hi All

When I have a text box, list box, and a datagrid, how does a
CurrencyManager relate to all these controls(seeing as though the datagrid
uses Complex binding and textbox and list box use simple bound. So for
example if I have a text box, list box and a Datagrid on a windows form, and
I want to navigate the records in a dataset(and we must not forget the child
records from the child tables aswell!) How do I create the CurrencyManager
to handle this navigation and how do I "bind" this currencymanager to all
the controls on my form?(or is a CurrencyManager created for me?) , AND is
it possible to have one control belonging to more that one CurrencyManager?
Can someone explain this to me aor provide me with links to good information about this

I hope that my explanation was good enough to understand:)

Thanks alot for any of your help on this. I just want to learn more about
this "DataBinding" story,because I do not understand it very well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top