Data binding problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have a problem that is driving me crazy. I have two forms, both with tab controls. Multiple tab pages contain controls bound to a datatable. One form behaves correctly. The other form loses it's edits when you change pages. So if I modifiy an edit control, then switch tabs, when I come back the changes are gone. I do not wish to call EndCurrentEdit, in case the user decides to cancel his edits. I have been through both form's code and can see no fundamental differences. Hoping someone can say .. Oh Yeah, you need to do this ..

EO
 
You could try Suspending the binding on the tab page switch.. thats all I
can think of right now..

i.e.

Dim cm as CurrencyManager

cm = BindingContext(myDataSource, "MyDataTable")

cm.Suspendbinding()

EOliver said:
Hi,

I have a problem that is driving me crazy. I have two forms, both with tab
controls. Multiple tab pages contain controls bound to a datatable. One form
behaves correctly. The other form loses it's edits when you change pages. So
if I modifiy an edit control, then switch tabs, when I come back the changes
are gone. I do not wish to call EndCurrentEdit, in case the user decides to
cancel his edits. I have been through both form's code and can see no
fundamental differences. Hoping someone can say .. Oh Yeah, you need to do
this ...
 
I try that. Thank

----- CJ Taylor wrote: ----

You could try Suspending the binding on the tab page switch.. thats all
can think of right now.

i.e

Dim cm as CurrencyManage

cm = BindingContext(myDataSource, "MyDataTable"

cm.Suspendbinding(

EOliver said:
controls. Multiple tab pages contain controls bound to a datatable. One for
behaves correctly. The other form loses it's edits when you change pages. S
if I modifiy an edit control, then switch tabs, when I come back the change
are gone. I do not wish to call EndCurrentEdit, in case the user decides t
cancel his edits. I have been through both form's code and can see n
fundamental differences. Hoping someone can say .. Oh Yeah, you need to d
this ..
 
Back
Top