Solved

HasChanges with dynamically altered textbox

Posted on 2004-09-10
3
302 Views
Last Modified: 2008-01-09
I have a textbox that is databound to my dataset.  When I alter this textbox manually, ds.HasChanges is true--great.  However, when I alter the contents of this textbox dynamically, ds.HasChanges = false.  I have gotten around this by giving this textbox focus and then moving the focus off of it immediately.  It seems to me that the changes are only modified in the dataset when the leave event fires.

This is not a good solution.  How can I register these changes with the dataset without my little hack?
0
Comment
Question by:fisc
  • 2
3 Comments
 

Author Comment

by:fisc
ID: 12055977
Anybody?  I didn't think this was a hard question! I'll up the points!
0
 
LVL 8

Accepted Solution

by:
wguerram earned 250 total points
ID: 12122651
Instead of modifying the textbox, modify the datarow of the dataset.

That should reflect the changes to the textbox.
0
 

Author Comment

by:fisc
ID: 12122842
Ahh! You are so wise!  I still think the change to the textbox should register with the dataset its bound to without getting and losing focus, but I suppose this will work instead.  Thanks for the suggestion!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now