P
Piotrekk
Hi
I have problem with propertymanager in my code. PositionChanged event
is not even raised. When i increase position, the value remains the
same - as a result textbox.Text value remains also unchanged.
How to solve these problems? I have tried to google but couldn't find
a solution.
ps - dataSet11 is typed dataset and is properly filled.
private void Form1_Load(object sender, EventArgs e)
{
employeesTableAdapter1.Fill(dataSet11.Employees);
tb = new TextBox();
this.Controls.Add(tb);
tb.Location = new Point(50, 50);
tb.DataBindings.Add("Text", dataSet11.Employees,
"Lastname");
pm = (PropertyManager)this.BindingContext[tb];
pm.PositionChanged += new
EventHandler(pm_PositionChanged);
}
void pm_PositionChanged(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
pm.Position += 1;
}
Kind Regards
I have problem with propertymanager in my code. PositionChanged event
is not even raised. When i increase position, the value remains the
same - as a result textbox.Text value remains also unchanged.
How to solve these problems? I have tried to google but couldn't find
a solution.
ps - dataSet11 is typed dataset and is properly filled.
private void Form1_Load(object sender, EventArgs e)
{
employeesTableAdapter1.Fill(dataSet11.Employees);
tb = new TextBox();
this.Controls.Add(tb);
tb.Location = new Point(50, 50);
tb.DataBindings.Add("Text", dataSet11.Employees,
"Lastname");
pm = (PropertyManager)this.BindingContext[tb];
pm.PositionChanged += new
EventHandler(pm_PositionChanged);
}
void pm_PositionChanged(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
pm.Position += 1;
}
Kind Regards