Ok I will try to explain my problem:
I have a complex model in wich there a are some nested collections.
The main model A contains another model B, B contains a collection of models C, C contains a collection of models D, and D contains a collection of models E.
A
B
C col (does not use BeginCollectionItem)
D col (does not use BeginCollectionItem)
E col (uses BeginCollectionItem)
When I load the page, I just sent model A.
then I retrieve a B model containing a collection of C models (and each one of this C models contains a collection of D models).
this is done via ajax, without using begincollectionitem (and it works ok, if I would submit the form now, everything would be correctly binded).
Now the problem is, I have now to make it so that the user can dinamically create new items of E models inside some of those D models that were retrieved via ajax. So, editorTemplate for model E does use beginCollectionItem.
But its not creating the name of these inputs correctly.
For exmaple, in the editorTemplate for model D, the names are created like this (this is ok)
B.C[375b1530-4209-4f02-a73a-37a15dd532ce].D[c8e19373-8889-4098-bc37-2939bb96e74b].somePropertyOfD
But in the editorTemplate for model E (the one that is not working), are like this:
B.C.D.E[8f83a35d-b3f6-410e-b9f0-ced7e180b4df].somePropertyOfE
In beginCollectionItem for model E I am doing like this:
@using (Html.BeginCollectionItem("E")) {
And I have also tried with this:
@using (Html.BeginCollectionItem("B.C.D.E")) {
Nut none worked… it just is not adding there the guids for parent models…