Hello everyone,
I am using VS2005 and .NET 2.0, and I have a simple databinding question.
I have a textbox on a winform w/ the id, txtSampleSize1.
I also have a protected class variable of type, double, w/ the name: m_SampleSize1
I try to setup the binding between these two using the following statements:
But then when I change the value of the textbox, the underlying m_SampleSize1 is not also changed. I thought that was the way it was supposed to work.
What am I missing here?
Thanks,
Paul
The answer to getting answered -- faq855-2992
I am using VS2005 and .NET 2.0, and I have a simple databinding question.
I have a textbox on a winform w/ the id, txtSampleSize1.
I also have a protected class variable of type, double, w/ the name: m_SampleSize1
I try to setup the binding between these two using the following statements:
Code:
txtSampleSize1.DataBindings.Add("Text", m_SampleSize1, null);
txtSampleSize1.DataBindings[0].DataSourceUpdateMode = DataSourceUpdateMode.OnPropertyChanged;
But then when I change the value of the textbox, the underlying m_SampleSize1 is not also changed. I thought that was the way it was supposed to work.
What am I missing here?
Thanks,
Paul


The answer to getting answered -- faq855-2992