In webforms I used a repeater inside a repeater(Hieararchical model). How can I achieve the same in MVC?
Example:
Data1 Data2
subdata1 subddata3
subdata2 subdata4
Data3 data4
subdata5 subdata7
subdata6 subdata8
I also require a two column layout as shown above. Any ideas ??
I can’t remember where I read this, but it applies to you:
Let’s say your view model has a property called
Dataof typeIEnumerable<SuperDuper>. To iterate over it, you’d just doTo iterate over subdata, let’s say that
SuperDuperhas a property namedSubDatathat’s also anIEnumerable<Something>. Nothing stops you from doingFor the two-column layout, resort to CSS.
And since Razor is on it’s way, I can’t resist to show you what those examples would look like with the new engine: