BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
@(Html.EJ().Grid<AppraisalSummary>("ResultsGrid") .Datasource((IEnumerable<AppraisalSummary>)Model.Results.Results) .Locale("en-GB").AllowScrolling(true).ScrollSettings(col => { col.Height(450); }).MinWidth(905).EnableAltRow() .IsResponsive(true).AllowResizing().AllowResizeToFit().ClientSideEvents(e => e.RowSelected("row_clicked")) .Columns(col => { col.Field(f => f.RecordUrl).HeaderText("RecordUrl").Visible(false).CssClass("RecordUrl"); col.Field(f => f.Title).HeaderText("Title").Add(); col.Field(f => f.FirstName).HeaderText("First Name").Add(); col.Field(f => f.MI).HeaderText("MI").Add(); col.Field(f => f.LastName).HeaderText("Last Name").Add(); col.Field(f => f.Email).HeaderText("Email").Add(); col.Field(f => f.DoctorType).HeaderText("Doctor Type").Add(); Model.Results.Results.First().Breakdowns.ForEach((b) => //todo: This is using the first result for every row { col.HeaderText("Due").Format(b.Due.ToString()).Add(); col.HeaderText("Completed").Format(b.Completed.ToString()).Add(); col.HeaderText("%").Format(b.PercentageComplete.ToString()).Add(); } ); }) )
public class AppraisalSummary { public Guid Id { get; set; } public string RecordUrl { get; set; } public string Title { get; set; } public string FirstName { get; set; } public string MI { get; set; } public string LastName { get; set; } public string Email { get; set; } public string DoctorType { get; set; } public List<AppraisalSummaryTypeBreakdown> Breakdowns { get; set; } }
public class AppraisalSummaryTypeBreakdown { public Guid? TypeId { get; set; } public string TypeName { get; set; } public int Due { get; set; } public int Completed { get; set; } public double PercentageComplete { get; set; } }
@(Html.EJ().Grid<AppraisalSummary>("ResultsGrid")
.Datasource((IEnumerable<AppraisalSummary>)Model)
.Columns(col =>
{
. ..
//Complex columns
col.Field("Breakdowns.0.Completed").Add();
col.Field("Breakdowns.0.Due").Add();
col.Field("Breakdowns.0.PercentageComplete").Add();
})
) |