<div class="list-container">
@(Html.DevExtreme().List()
.Height("100%")
.Grouped(true)
.CollapsibleGroups(true)
.GroupTemplate(@<text>
<div>Assigned: <%- key %></div>
</text>)
.DataSource(Model)
)
</div>
using DevExtreme.NETCore.Demos.Models.SampleData;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
namespace DevExtreme.NETCore.Demos.Controllers {
public class ListController : Controller {
public ActionResult GroupedList() {
return View(SampleData.ListGroupedData);
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
namespace DevExtreme.NETCore.Demos.Models.SampleData {
public partial class SampleData {
public static IEnumerable<object> ListGroupedData = new[] {
new {
key = "Mr. John Heart",
items = new[] {
"Choose between PPO and HMO Health Plan",
"Google AdWords Strategy",
"New Brochures",
"Update NDA Agreement",
"Review Product Recall Report by Engineering Team"
}
},
new {
key = "Mrs. Olivia Peyton",
items = new[] {
"Update Personnel Files",
"Review Health Insurance Options Under the Affordable Care Act",
"Non-Compete Agreements"
}
},
new {
key = "Mr. Robert Reagan",
items = new[] {
"Deliver R&D Plans for 2013",
"Decide on Mobile Devices to Use in the Field",
"Try New Touch-Enabled WinForms Apps",
"Approval on Converting to New HDMI Specification"
}
},
new {
key = "Ms. Greta Sims",
items = new[] {
"Approve Hiring of John Jeffers",
"Update Employee Files with New NDA",
"Give Final Approval for Refunds"
}
},
new {
key = "Mr. Brett Wade",
items = new[] {
"Prepare 3013 Marketing Plan",
"Rollout of New Website and Marketing Brochures",
"Review 2012 Sales Report and Approve 2013 Plans",
"Review Site Up-Time Report"
}
},
new {
key = "Mrs. Sandra Johnson",
items = new[] {
"Provide New Health Insurance Docs",
"Review HR Budget Company Wide",
"Final Budget Review"
}
},
new {
key = "Mr. Kevin Carter",
items = new[] {
"Sign Updated NDA",
"Review Overtime Report",
"Upgrade Server Hardware",
"Upgrade Personal Computers"
}
},
new {
key = "Ms. Cynthia Stanwick",
items = new[] {
"Prepare 2013 Financial",
"Update Revenue Projections",
"Submit D&B Number to ISP for Credit Approval"
}
},
new {
key = "Dr. Kent Samuelson",
items = new[] {
"Update Sales Strategy Documents",
"Review Revenue Projections",
"Refund Request Template"
}
}
};
}
}
.list-container {
min-height: 440px;
width: 100%;
height: auto;
position: absolute;
top: 0;
bottom: 0;
}