| John Spencer wrote: |
Remco, Don't worry if you can not help here but I took a look at your suggestion and these methods seem to apply to editing datatables directly, i.e not to form entry.
|
|
It should'nt matter if there is a connection
| John Spencer wrote: |
My problem here comes about with a form tab. When a user updates a form, a last update value is set on the record via one of the text box fields, which is bound to the datatable upon which the form is based. This Form/Datatable is part of a TabControl.
Normally this works fine but when I change to another tab, the update of this text box is ignored.
|
|
This statement is commiting pending changes back to the datatabel
connected or Not. it doesn't matter
BindingContext(YouTabel.DefaultView).EndCurrentEdit()
maybe - Yourtabel.AcceptChanges()
| John Spencer wrote: |
In detail, user edits data in form Tab 1 based on datatable X then clicks on another tab to go to Tab 2 (another form within the tabcontrol object). To update the last update, the Form_leaving trigger in Tab1 writes date/time into last_update text box of Tab 1 I think you could call here endcurrendedit and then goes to Tab 2. If I go back to Tab 1 the last update change has been ignored.
Hence what I want is some form of Form enter type command ("ENTER" in Oracle Forms!) which commits the last update to the table. I have tried writing the date directly to the table but this then ignores the changes the user made originally.
|
|
If i understand correctly(probably not i'm not natve english), you want to know
1. a event when a form is activated
use the activate event (duh) on the form
or
You want to know when the recordpointer is changed ?
declare a valiable like this
Private WithEvents _Navigator As BindingManagerBase
after creation of your table
_navigator = BindingContext(_Tabel)
then handle the positionchanged event on the _navigator variable
else
sorry
Remco