foreach (var group in Model.selectedNews.InGroupsOf(3)) { @:<div class="parent"> foreach (var item in group) { //get 3 nodes, then create new parent div <div><a href="#">@item.Name</a></div> } @:<div>
That's because the Multi-Node Tree Picker stores only the Id's of the selected nodes. Depending on how you're storing the nodes, XML of CSV, you could do one of the following:
IngroupsOf
Hi,
I am new to razor. I hope someone can help me.
From a property of type 'Multi-Node Tree Picker' i select variuos nodes.
I want to list with 3 items on each row.
I tried using mod, with no luck. Then i saw InGroupsOf, which seems perfect.
But i cant get it to work. I have this:
That's because the Multi-Node Tree Picker stores only the Id's of the selected nodes. Depending on how you're storing the nodes, XML of CSV, you could do one of the following:
CSV:
XML:
Thanks, it works. Have a great weekend and thank you again.
is working on a reply...