Hi!
I'm pulling my hair out over this one. It's probably one of those 'duh...why didn't I see that before' moments, but here goes:
I have a treeview that displays all the records in a DB. When a node is clicked, it populates a class which in turn is displayed on the form for the user to view or modify.
I am using a SaveChanges method which writes all the data back to the class and then calls Class.Save().
The problem is this: If I try to put the SaveChanges in the Node_click event (save the current record before showing the next record), the SaveChanges causes an error because there is no existing class.
Is there any way to do this without losing any more of my hair?
I'm pulling my hair out over this one. It's probably one of those 'duh...why didn't I see that before' moments, but here goes:
I have a treeview that displays all the records in a DB. When a node is clicked, it populates a class which in turn is displayed on the form for the user to view or modify.
I am using a SaveChanges method which writes all the data back to the class and then calls Class.Save().
The problem is this: If I try to put the SaveChanges in the Node_click event (save the current record before showing the next record), the SaveChanges causes an error because there is no existing class.
Is there any way to do this without losing any more of my hair?