Hi to all,
I have an object that has a property numberOfFilesDe leted which is an
integer. I want to bind a label to it so that when the value changes, the
label gets updated on the screen.
I have used the following code to bind the text property of the label to the
object property.
private void WinForm_Load(ob ject sender, System.EventArg s e)
{
label1.DataBind ings.Add(new Binding("Text", directorySweepO bj,
"numberOfFilesD eleted"));
}
When I do the following :
private void button1_Click(o bject sender, System.EventArg s e)
{
directorySweepO bj.numberOfFile sDeleted =
directorySweepO bj.numberOfFile sDeleted + 1
}
I would expect the label to be updated, but it is not.
What am I doing wrong?
Sham.
I have an object that has a property numberOfFilesDe leted which is an
integer. I want to bind a label to it so that when the value changes, the
label gets updated on the screen.
I have used the following code to bind the text property of the label to the
object property.
private void WinForm_Load(ob ject sender, System.EventArg s e)
{
label1.DataBind ings.Add(new Binding("Text", directorySweepO bj,
"numberOfFilesD eleted"));
}
When I do the following :
private void button1_Click(o bject sender, System.EventArg s e)
{
directorySweepO bj.numberOfFile sDeleted =
directorySweepO bj.numberOfFile sDeleted + 1
}
I would expect the label to be updated, but it is not.
What am I doing wrong?
Sham.
Comment