G
Guest
Pressing a Save Button on a Toolbar will not bind or validate the last value entered in a text box.
I have found that when clicking on the Toolbar the focus in the binded text box does not leave. Therefore in this case not saving the last entry when saving.
I am able to use the following code to get round the updating of the object from the field value with this code before saving
Private m_Record As Customer
.......
Private Sub TopToolBar_ToolClick(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinToolbars.ToolClickEventArgs) Handles TopToolBar.ToolClick
'Ensure last value has been placed into the object
Me.BindingContext(m_Record).EndCurrentEdit()
SetCustomer(m_Record)
End Sub
however my validating method on the field needs to run on the field before saving.
Has anyone got an elequent way of successfully validating and binding a value before pressing the save button on a toolbar.
Thank you in advance
Stewart
I have found that when clicking on the Toolbar the focus in the binded text box does not leave. Therefore in this case not saving the last entry when saving.
I am able to use the following code to get round the updating of the object from the field value with this code before saving
Private m_Record As Customer
.......
Private Sub TopToolBar_ToolClick(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinToolbars.ToolClickEventArgs) Handles TopToolBar.ToolClick
'Ensure last value has been placed into the object
Me.BindingContext(m_Record).EndCurrentEdit()
SetCustomer(m_Record)
End Sub
however my validating method on the field needs to run on the field before saving.
Has anyone got an elequent way of successfully validating and binding a value before pressing the save button on a toolbar.
Thank you in advance
Stewart