DataBinding removal error
-
I have a textBox databound to a datatable via the properties window. It works well. I now need to remove this databinding. When doing this, via the properties window, and setting the Text section of DataBindings back to 'None' I get this error when re-running the solution: 'object reference not set to an instance of an object' for line: firstPaymentDateTextBox.DataBindings["Text"].Format += new ConvertEventHandler(DebtConvert.DateToString); it seems that VS 2008 does not remove this line when resetting the databinding via the designer properties window. It there a way around this please? As I have a lot of databindings to remove it seems a little tedious for such a, otherwise, powerful IDE.
-
I have a textBox databound to a datatable via the properties window. It works well. I now need to remove this databinding. When doing this, via the properties window, and setting the Text section of DataBindings back to 'None' I get this error when re-running the solution: 'object reference not set to an instance of an object' for line: firstPaymentDateTextBox.DataBindings["Text"].Format += new ConvertEventHandler(DebtConvert.DateToString); it seems that VS 2008 does not remove this line when resetting the databinding via the designer properties window. It there a way around this please? As I have a lot of databindings to remove it seems a little tedious for such a, otherwise, powerful IDE.
Why do you need to remove the bindings?
-
Why do you need to remove the bindings?
The project has changed and the data binding for the textbox is no longer required.