Click here to Skip to main content
15,902,492 members
Home / Discussions / Windows Forms
   

Windows Forms

 
GeneralRe: Record Status or Detecting Value Changes Pin
FyreWyrm4-Jun-08 13:39
FyreWyrm4-Jun-08 13:39 
AnswerRe: Record Status or Detecting Value Changes Pin
Mike Dimmick2-Jun-08 6:01
Mike Dimmick2-Jun-08 6:01 
GeneralRe: Record Status or Detecting Value Changes Pin
FyreWyrm2-Jun-08 12:45
FyreWyrm2-Jun-08 12:45 
GeneralRe: Record Status or Detecting Value Changes Pin
Robert Rohde2-Jun-08 22:22
Robert Rohde2-Jun-08 22:22 
AnswerRe: Record Status or Detecting Value Changes Pin
Pete O'Hanlon2-Jun-08 21:42
mvePete O'Hanlon2-Jun-08 21:42 
GeneralRe: Record Status or Detecting Value Changes Pin
FyreWyrm3-Jun-08 16:05
FyreWyrm3-Jun-08 16:05 
GeneralRe: Record Status or Detecting Value Changes Pin
Pete O'Hanlon4-Jun-08 2:01
mvePete O'Hanlon4-Jun-08 2:01 
QuestionRe: Record Status or Detecting Value Changes Pin
FyreWyrm5-Jun-08 7:44
FyreWyrm5-Jun-08 7:44 
Pete, this is sort of working and sort of isn't. Tracking the changes is working, but something strange is happening with my objects. This form has a collection of records and only displays one record at a time allowing users to navigate through records. Any time fields are changed on the displayed record, the changes are translated automatically back up into the collection. Here's an example:

class Form
{
     private Objects _objects = new Objects();
     private Object  _object  = new Object();
     private int     _index   = 0;
<p></p>
     private void Form_Load(blah)
     {
       _objects = GetAllObjects();
       _object = _objects[_index];
       formBindingSource.DataSource = _object;
     }
<p></p>
     private void NextButton_Click(blah)
     {
       _index++;
       _object = _objects[_index];
       formBindingSource.DataSource = _object;
     }
}

When the user then changes any field on the screen, I see the setter called for that property (which is good). Then in the event handler for the "Next Record" button I can look at the collection, and all of their changes to the current object have been written back into the collection. I don't even have any code to set the object back into the collection! It's like when the databinding link is made my _object becomes a pointer to _objects[0] instead of a copy of _objects[0]. Any ideas?
AnswerRe: Record Status or Detecting Value Changes Pin
Pete O'Hanlon5-Jun-08 10:17
mvePete O'Hanlon5-Jun-08 10:17 
QuestionFTP / User Upload Pin
jonig1930-May-08 10:14
jonig1930-May-08 10:14 
AnswerRe: FTP / User Upload Pin
led mike2-Jun-08 4:28
led mike2-Jun-08 4:28 
Questionconnecting to the google talk server Pin
joachimpr30-May-08 8:54
joachimpr30-May-08 8:54 
AnswerRe: connecting to the google talk server Pin
led mike30-May-08 9:13
led mike30-May-08 9:13 
JokeRe: connecting to the google talk server Pin
joachimpr1-Jun-08 20:09
joachimpr1-Jun-08 20:09 
GeneralRe: connecting to the google talk server Pin
led mike2-Jun-08 4:26
led mike2-Jun-08 4:26 
GeneralRe: connecting to the google talk server Pin
joachimpr4-Jun-08 2:29
joachimpr4-Jun-08 2:29 
GeneralRe: connecting to the google talk server Pin
led mike4-Jun-08 5:17
led mike4-Jun-08 5:17 
GeneralRe: connecting to the google talk server Pin
joachimpr5-Jun-08 21:07
joachimpr5-Jun-08 21:07 
GeneralRe: connecting to the google talk server Pin
Harvey Saayman2-Jun-08 20:33
Harvey Saayman2-Jun-08 20:33 
GeneralRe: connecting to the google talk server Pin
joachimpr5-Jun-08 21:23
joachimpr5-Jun-08 21:23 
GeneralRe: connecting to the google talk server Pin
Harvey Saayman8-Jun-08 19:48
Harvey Saayman8-Jun-08 19:48 
QuestionA file with the same path already exists in the project. Pin
balaji_vbr29-May-08 19:48
balaji_vbr29-May-08 19:48 
QuestionShould not copy-paste in textbox into textbox in C#.Net Pin
somagunasekaran29-May-08 3:19
somagunasekaran29-May-08 3:19 
AnswerRe: Should not copy-paste in textbox into textbox in C#.Net Pin
buchstaben29-May-08 22:54
buchstaben29-May-08 22:54 
GeneralRe: Should not copy-paste in textbox into textbox in C#.Net Pin
dan!sh 29-May-08 23:32
professional dan!sh 29-May-08 23:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.