Skip to content

Instantly share code, notes, and snippets.

@SeloSlav
Last active June 13, 2018 07:45
Show Gist options
  • Save SeloSlav/93e1d0e1de207ae56d0a77ebed9e36dd to your computer and use it in GitHub Desktop.
Save SeloSlav/93e1d0e1de207ae56d0a77ebed9e36dd to your computer and use it in GitHub Desktop.
A sample CSHTML page to render your batched list (from https://gist.github.com/SeloSlav/4236f034fbf76ed11f0558939daedabe)
@foreach (var batch in Model.List.Batch(4))
{
<div class="row"> // Bootstrap.css row
@foreach (var item in batch)
{
<div class="col-lg-3">item.ObjectId</div> // Bootstrap.css column, i.e. col-lg-3 is 4 columns at screen resolution 'large'
}
</div>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment