O
olrt
Hello,
Here's the case I want to address with the help of the designers (I'm
using Visual Studio C# Express).
Let's say I designed a typed DataSet (named BidonDataSet).
Let's say I designed a Windows Form (named Form1).
In this form I designed a DataGridView (named DgArticles).
I bound DgArticles to the generated aRTICLESBindingSource itself bound
to the datamember "ARTICLES" of BidonDataSet instance in my form.
Now I designed a second Windows Form (named Form2).
In this form I designed a TextBox.
I want the TextBox to be bound to the "ID" column of
aRTICLESBindingSource.
I managed to bind manually the TextBox with code like this :
------------------------------------------------------------
this.iDTextBox.DataBindings.Add(new
System.Windows.Forms.Binding("Text", src, "ID", true));
where src is aRTICLESBindingSource.
------------------------------------------------------------
It works great !!
Now the question :
Could it be possible to have the designer bind a TextBox to a
BindingSource defined in an another Form ? All I can see is that the
Wizard only proposes me a list of DataSets and DataMembers...
Thanks for your help !
Here's the case I want to address with the help of the designers (I'm
using Visual Studio C# Express).
Let's say I designed a typed DataSet (named BidonDataSet).
Let's say I designed a Windows Form (named Form1).
In this form I designed a DataGridView (named DgArticles).
I bound DgArticles to the generated aRTICLESBindingSource itself bound
to the datamember "ARTICLES" of BidonDataSet instance in my form.
Now I designed a second Windows Form (named Form2).
In this form I designed a TextBox.
I want the TextBox to be bound to the "ID" column of
aRTICLESBindingSource.
I managed to bind manually the TextBox with code like this :
------------------------------------------------------------
this.iDTextBox.DataBindings.Add(new
System.Windows.Forms.Binding("Text", src, "ID", true));
where src is aRTICLESBindingSource.
------------------------------------------------------------
It works great !!
Now the question :
Could it be possible to have the designer bind a TextBox to a
BindingSource defined in an another Form ? All I can see is that the
Wizard only proposes me a list of DataSets and DataMembers...
Thanks for your help !