I am struggling on how to implement the model-view-presenter pattern. The way I use this pattern is as follows:
Now I have a form where a company can be registered. But the can have multiple contact persons. So, on this form I have a grid with contact persons.
My question is, should I add the contact person fields to the same view as the other company fields? Or should I seperate it in another view, so that the form implements two views (the ICompanyView and IContactPersonView) with two presenter classes?
First of all, don't have your views instantiate presenters, you don't want that. Whatever the flavor you use for MVP (Passive View, Supervising Controller) your view should contain as less as possible. What I do is have a view in presenter constructor, and in presenter Initialize() method I assign
view.Presenter = this (you can also do this in Start() or some other "show" method, but I usually separate Initialization to another call because of the presenter lifecycle issues)
As for your multiple views question, if you have complex logic in that part of the form (but I don't see it in your example) you could probably separate that in separate user control / MVP triad - this helped me to reduce and simplify the code of the presenters.
If you need the IContactPersonView/ICompanyView only elsewhere than split them other wise do not.