Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Data Binding / September 2008

Tip: Looking for answers? Try searching our database.

form is erasing data when calling EndCurrentEdit. Please help!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
George Hardy - 27 Aug 2008 19:04 GMT
hi all,

this is probably a stupid question, or im missing something.
I have a customer info form, bound.  I load with the following:

--------------------------
FillCombos() 'fills combo boxes
Me.DsCustomerDetail1.Customer.Clear()
Me.BindingContext(Me.DsCustomerDetail1.Customer).AddNew()
---------------------------

then, when a user fills in the form, and hits the SAVE button on the
toolbar, i do this:

----------------------------
Me.BindingContext(Me.DsCustomerDetail1.Customer).EndCurrentEdit()
   If Me.DsCustomerDetail1.HasChanges Then
       Me.daCustomer.Update(Me.DsCustomerDetail1.Customer)
       bSaved = True
       Me.DsCustomerDetail1.AcceptChanges()
   Exit Sub
End If
-----------------------------

when it does the endcurrentedit, it clears out the text boxes, and doesn't
save anything.

what am i doing wrong?

thanks in advance!
george
RobinS - 30 Aug 2008 08:14 GMT
What version of .Net are you using and what version of VS?

RobinS.

> hi all,
>
[quoted text clipped - 27 lines]
> thanks in advance!
> george
George Hardy - 09 Sep 2008 19:15 GMT
2008 .net framework 2.0

> What version of .Net are you using and what version of VS?
>
[quoted text clipped - 32 lines]
>> thanks in advance!
>> george

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.