Object Binding Question
-
Can we achieve an child-parent lookup when we establish an object binding ? Sorry i cant express it well so i'll give an example: Let's suppose we have class Student and a class Classroom related in a way as follows. class Classroom { public string Name {get;set;} public string Code {get;set;} } We load from a db and get an Classroom[] { a , b , c , d}. class Student { public string Name {get;set;} public Classroom ClassRoom {get;set;} } We load students from a db. Is this possible to bind Student.ClassRoom to a combobox which simultaneously be a lookup table deriving Classroom values from Classroom[] object i've already loaded and submit changes to the current student object of the binding source ? I have done it with datasets so i assume it can be done with objects but project requirements exclude typed dataset and it's obligatory to use business objects. It's not a homework , i'm not asking the code just a guideline or a decent data binding articles for .net 2.0 . Thanx in advance.