Solved

HasChanges with dynamically altered textbox

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

830 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