Solved

HasChanges with dynamically altered textbox

Posted on 2004-09-10
3
299 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

760 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

23 Experts available now in Live!

Get 1:1 Help Now