Thank you replying, I took your advice and tried, it, I ended up with the below error:
'umbraco.item' does not contain a definition for 'Count'
Also, the foreach was specifying that for each iteminside the List, to do something, but in your code, "item" hasn't been defined at all. I don't know if what I'm saying makes any sense to you or if I may be wrong.
Get every first, second and third Text Field in Nested Content, and place in columns
Hi,
How can I get the nested content text fields to be placed in different grid columns through razor code ? (see image below for clarification)
Below is the code I setup so far but it's not working, I keep getting an error saying :
and I perfectly understand what the error mean, I just can't find a good solution to my problem.
Any help will be greatly appreciated, thanks.
Hi
the quick way would be to change the foreach to a for loop ?
Hi Kevin,
Thank you replying, I took your advice and tried, it, I ended up with the below error:
Also, the
foreach
was specifying that for eachitem
inside theList
, to do something, but in your code, "item" hasn't been defined at all. I don't know if what I'm saying makes any sense to you or if I may be wrong.Hi ,
yeah
Count
works if your values are turned into a list (via.ToList()
) butCount()
should work without that.and yes it should be List not item. my bad. try ...
You might also want to change the Variable name from
List
to something else, as there is a .net List class and it might get confusing...Ok, I changed the
List
tolistItems
, now I'm getting a new errorFor reference this is what I have so far
*UPDATE*
Your code actually worked, all I did was removing the parentheses
()
from theCount
(Count()
toCount
)Thank a lot for helping with this Kevin, I really appreciated your help solving this.
is working on a reply...