T
tomse
Hello,
a strange, but probably simple, problem drives me nuts:
I have simple databinding of textbox to bindingsource(bound to
dataset), created in form constructor:
public Form3(string xyz)
{
InitializeComponent();
Program.bs.AddNew();
textBox1.DataBindings.Add("Text", Program.bs, "cmType");
textBox1.Text = xyz; // <-nothing happens
}
all I want is to add a new row to dataset, and set a value of column
"cmType" programatically in form constructor. Problem is that result of
program above is blank textBox1, and no data in "cmType".
If i fill textBox1 in onFormShow event, everything goes ok.
Anyone can help?
thx
a strange, but probably simple, problem drives me nuts:
I have simple databinding of textbox to bindingsource(bound to
dataset), created in form constructor:
public Form3(string xyz)
{
InitializeComponent();
Program.bs.AddNew();
textBox1.DataBindings.Add("Text", Program.bs, "cmType");
textBox1.Text = xyz; // <-nothing happens
}
all I want is to add a new row to dataset, and set a value of column
"cmType" programatically in form constructor. Problem is that result of
program above is blank textBox1, and no data in "cmType".
If i fill textBox1 in onFormShow event, everything goes ok.
Anyone can help?
thx