• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 336
  • Last Modified:

HasChanges with dynamically altered textbox

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
fisc
Asked:
fisc
  • 2
1 Solution
 
fiscAuthor Commented:
Anybody?  I didn't think this was a hard question! I'll up the points!
0
 
wguerramCommented:
Instead of modifying the textbox, modify the datarow of the dataset.

That should reflect the changes to the textbox.
0
 
fiscAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now