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 General / February 2005

Tip: Looking for answers? Try searching our database.

Posting the current row

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
BryanShaw - 12 Oct 2004 14:43 GMT
I have been trying to follow the Building an N-Tier Application in .NET
Technical Article that Paul Sheriff wrote.  I am having trouble, however,
with one particular aspect and I was wondering if you could help me.

The problem centers around bound controls on the Client application.  If you
place a TextEdit box and bind it using the DataBindings.Add method:  
edtFirstName.DataBindings.Add(new Binding(“Text”, mdsEmps,
“Employees.FirstName”)  this is  C-Sharp code, by the way.

Now, as I type in the edtFirstName control and I click on the Update button,
the if mdsEmps.HasChanges fails.  If, however, I click on the next row of the
datagrid, moving the record pointer, then I click on Update, then the test
succeeeds.

In other languages, the moving of the record pointer automatically performs
a Post on the dataset.  Is there a command like this in .NET?  If so, I have
not been able to find one.  The row state remains unchanged until you move
off of it.  

I am also wondering if I need to put the row into Edit mode somehow.  I
appreciate any help you can give in this matter.
Sijin Joseph - 13 Oct 2004 05:18 GMT
The changes will commit to the datasource only after you move focus away
from the control. If you want to commit changes earlier you will have to
override the control and call EndCurrentEdit() on BindingManagerBase for
the control.

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph

> I have been trying to follow the Building an N-Tier Application in .NET
> Technical Article that Paul Sheriff wrote.  I am having trouble, however,
[quoted text clipped - 17 lines]
> I am also wondering if I need to put the row into Edit mode somehow.  I
> appreciate any help you can give in this matter.
WhiskyRomeo - 21 Feb 2005 23:23 GMT
I have this exact problem also.  Changing the focus away from the control
does not help.  You have to change records.  I execute . . .

Me.BindingContext(dsClients, "tblClient").EndCurrentEdit()

and still get the failure.  Yet GetChanges works.  

My problems is I have a from that only displays one record at a time so
there is no other record to move to and since "EndCurrentEdit" doesn't work I
am stuck.

Any addtional insights would be appreciated.

WR

> The changes will commit to the datasource only after you move focus away
> from the control. If you want to commit changes earlier you will have to
[quoted text clipped - 26 lines]
> > I am also wondering if I need to put the row into Edit mode somehow.  I
> > appreciate any help you can give in this matter.

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.