M
Michael Maes
Hello,
Binding the Value-Property of a NumericUpDown-Control (using DataBindings):
Dim bndNBRtechniciansForService As Binding = New Binding("Value", Me.dvInstallations, "NBRtechniciansForService")
AddHandler bndNBRtechniciansForService.Format, AddressOf NullToIud
AddHandler bndNBRtechniciansForService.Parse, AddressOf IudToDB
Me.iudNBRtechniciansForService.DataBindings.Add(bndNBRtechniciansForService)
produces the following exception:
An unhandled exception of type 'System.Exception' occurred in system.windows.forms.dll
Additional information: DataBinding could not find a row in the list that is suitable for all bindings
This occurs only if you close (dispose) the form (instance 1) and re-open it (new instance 2) AND you didn't activate the tab (on instance 1) containing the NUD-Control.
If you just click the tab containing that control before you close the form and then re-open a new instance of the form, there is not problem at all.
I think it has something to do with the TabPageControl re-binding but can't seem to find any input on that.
The controls are bound to a DataView
I use vb.NET 2003 ent. arch
XP SP1a
Any suggestions (like a work-arround) wuold be very nice,
Michael
Binding the Value-Property of a NumericUpDown-Control (using DataBindings):
Dim bndNBRtechniciansForService As Binding = New Binding("Value", Me.dvInstallations, "NBRtechniciansForService")
AddHandler bndNBRtechniciansForService.Format, AddressOf NullToIud
AddHandler bndNBRtechniciansForService.Parse, AddressOf IudToDB
Me.iudNBRtechniciansForService.DataBindings.Add(bndNBRtechniciansForService)
produces the following exception:
An unhandled exception of type 'System.Exception' occurred in system.windows.forms.dll
Additional information: DataBinding could not find a row in the list that is suitable for all bindings
This occurs only if you close (dispose) the form (instance 1) and re-open it (new instance 2) AND you didn't activate the tab (on instance 1) containing the NUD-Control.
If you just click the tab containing that control before you close the form and then re-open a new instance of the form, there is not problem at all.
I think it has something to do with the TabPageControl re-binding but can't seem to find any input on that.
The controls are bound to a DataView
I use vb.NET 2003 ent. arch
XP SP1a
Any suggestions (like a work-arround) wuold be very nice,
Michael