S
Samir Ibrahim
Guest
Hello
I have form bindingsource with datasource is datatable (using dataset or not is the same)
Let say I have a table ITEM with field ITEM_NAME
I have 3 tabpage in my form
in each pagetab a textbox (plus other controls, combo other textbox, check box etc)
each text box is bound to same property, ITEM.NAME using bindingsource
My question
How to capture if one of the textbox changes the other textbox bounded to the same bindingsource also changes without coding in the textChanged() of each textbox
I did my tests, I only managed to achieve that by using BindingComplete Event
Private Sub MyBindingSource_BindingComplete(sender As Object, e As BindingCompleteEventArgs) Handles MyBindingSource.BindingComplete
Binding.EndEdit
End Sub
but this approch will prevent me from changing other controls. If I change another control value and I save changes using the tableadapter they will not be saved because i use Endedit() where its known that you should code Endedit() then save, not using endedit then change values then save (I know that)
So how to make other controls changes if they share the same property in bindingsource() ?
Thanks
.Net Blog VFP Blog
Continue reading...
I have form bindingsource with datasource is datatable (using dataset or not is the same)
Let say I have a table ITEM with field ITEM_NAME
I have 3 tabpage in my form
in each pagetab a textbox (plus other controls, combo other textbox, check box etc)
each text box is bound to same property, ITEM.NAME using bindingsource
My question
How to capture if one of the textbox changes the other textbox bounded to the same bindingsource also changes without coding in the textChanged() of each textbox
I did my tests, I only managed to achieve that by using BindingComplete Event
Private Sub MyBindingSource_BindingComplete(sender As Object, e As BindingCompleteEventArgs) Handles MyBindingSource.BindingComplete
Binding.EndEdit
End Sub
but this approch will prevent me from changing other controls. If I change another control value and I save changes using the tableadapter they will not be saved because i use Endedit() where its known that you should code Endedit() then save, not using endedit then change values then save (I know that)
So how to make other controls changes if they share the same property in bindingsource() ?
Thanks
.Net Blog VFP Blog
Continue reading...