codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  notify an object that the user interface has changed one of its properties  thegios at 15:47 on Thursday, March 10, 2005
 


I have a class called CTask, used to implement in memory a TASK table in a database. Class properties are something like ID (read only), Startdate (read & write), Comments (read & write), etc; there are also several methods, but they are not importatnt for my question.

I have a form which is displayng information about the task from the CTasK class and of course it is also possible to update these information.
so for example on the form there is a DatePicker control to display & change the Startdate, and there is a texbox for Comments.

I need a way to mark the cCtask as updated when any of the above information has changed. of course I added a private variable called mUpdated (boolean) which is originally set to FALSE when the class is loaded; it is set to TRUE by every LEt method for each property.

Up to now no problem for me (and i hope I've been clear enough).

Now, what i want to do is to update a CTask property each time the corresponding control on the form is changed.
For the Startdate this is simple: in the OnChange event of the Datepicker control I update the Startdate property of my class (so the LET method will set the class status to TRUE).
But how can i do the same for the Comments textbox? If I use the same Onchange event, every time I add a letter, the class property will be updated and the class status updated, even if not necessary. is tehre a way to avoid this?

thanks a lot for any suggestion









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Problem with the Insert at a desired position in a FARPOINT GRID
•  Re: dynamic crystal report generation
•  Re: plz Help on this!
•  Re: Session variable
•  Re: Query on onLoad
•  Re: Data
•  Re: Saving a Picture or Image contained within a Picturebox into Windows Registry
•  display different images(for image button) in template column for each row
•  Re: crystal report - Logon failed.


Recent Articles
Communicating with the Database (Using ADO)
MagicGrid
Simple Thumbnail Browsing Solution
Type Anywhere
A Better Moustrap: FmtDate to replace FormatDateTime
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2005