Solved

HasChanges with dynamically altered textbox

Posted on 2004-09-10
3
309 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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…
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.

734 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