ravenswood1000
Member
- Joined
- Aug 21, 2010
- Messages
- 8
- Programming Experience
- 10+
Hi everyone. Found this forum yesterday and it looks like a great place to visit daily. It also looks like the place to pose this question.
I'm writing a order entry system and I'm using structures to pass information around various parts of the program for things like the order header (order date, customer name, etc).
In building the form I discovered that you could use a binding source between form controls and the struct which is great because it means alot less code on a form that will be very busy anyhow. Unfortunatly I'm either doing something wrong, or I've discovered a bug in vb.net because when you fill in a textbox and the binding source fires the setter for that attibute of the struct, it does one of two things. It either:
I know this sounds confusing so I'm including a small program that demonstrates the problem I'm having.
Can anyone cast thier eyeballs over this and see if it's me doing something wrong and if so get me back on the right track?
Thanks much in advance
I'm writing a order entry system and I'm using structures to pass information around various parts of the program for things like the order header (order date, customer name, etc).
In building the form I discovered that you could use a binding source between form controls and the struct which is great because it means alot less code on a form that will be very busy anyhow. Unfortunatly I'm either doing something wrong, or I've discovered a bug in vb.net because when you fill in a textbox and the binding source fires the setter for that attibute of the struct, it does one of two things. It either:
- Finds the struct that I assigned to the binding source then creates a new instance of it after it is done thus destroying any changes.
- Creates a new instance of the struct because it wants to rather than use the one I instructed.
I know this sounds confusing so I'm including a small program that demonstrates the problem I'm having.
Can anyone cast thier eyeballs over this and see if it's me doing something wrong and if so get me back on the right track?
Thanks much in advance
Attachments
Last edited by a moderator: