Order of calling EndCurrentEdit

  • Thread starter Thread starter Hemang Shah
  • Start date Start date
H

Hemang Shah

Hello

I have mutiple parent - child tables.

Is there any specific order in which I have to call the EndCurrentEdit() ?

In my testing it does make a difference, sometimes when I have changes in
both the tables, the update doesn't go through, the changes in the child
tables are dropped...

unless I put .endcurrentEdit() of the child table before that of the parent
table.

Any ideas ?

Thanks
 
Hemang,

I've never actually come across this issue, so my response is purely
theoretical. However, if you don't call EndCurrentEdit, how does the parent
table know there is a new or modified child row? You state that sometimes
the changes in the child tables are dropped. Have you found out when and
why? I'm assuming here, but could it be that when the changes aren't
dropped, it has to do with how the data is entered in a grid, i.e. the
changes have already been "ended" by moving to a new row?

Anyway, you seem to have found what works for you, so keep with it. :-)
 
Hemang,

The endcurrentedit pushes down your changes in a binded datasource, when the
cursor is still in the control or the control in that control (by instance a
row from a datagrid).

Therefore when in this case the control looses focus it can be a good place
to do an endcurrentedit on the binded datasource.

(However as well when you use buttons an endcurrentedit in those button
events, because with clicking a buttons an input control don't really loose
the focus).

Just my thought,

Cor
 
Back
Top