views:

111

answers:

1

Hi! I'm new with DOT.NET...

I'm trying to do: Build a winform with tree of lectures below i put a propertyGrid The propertyGrid must display the details of Lecture:The Subject,language ang Lectors. I want to add lectors to certain lecture "Lectors Collection" property in collection editor

Question: I need the LectureID parameter to be passed in the constructor of new Lector, for connecting the newly added lector record (in lectors collection of current Lecture) to his lecture. How can i do this?

+1  A: 

You'll have to write a TypeConverter so you can override its CreateInstance() method. PropertyGrid is a quick solution for simple classes but gets awkward in a hurry. Consider that it might not be the best UI solution. DataGridView is well suited to editing collections.

Hans Passant