Adding a new record

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I have a set of fields which I have bound to properties from a class. I am
not using any context manager or anything like that, simply fields bound to
the datasource. How can I add a new record on this form via code?

Thanks

Regards
 
Well, from what i can infer, to add a new record, you will need to create a
new instance of the class and databind that object to your fields. But you
most probably want to use collections so that you can navigate between
various instances of your objects. You will need to implement a custom
collection for that and make the collection implement IBindingList.

Take a look at this article from Rockford Lhotka, it should get you started
http://msdn.microsoft.com/vbasic/us...library/en-us/dnadvnet/html/vbnet02252003.asp
 
Back
Top