@(Html.EJ().Grid<Object>("EvictGrid")
.Datasource(ds => ds.Json(Model.EvictionForbearances).UpdateURL("EvictionForbearance/Update").Adaptor(AdaptorType.RemoteSaveAdaptor))
.AllowScrolling()
.ClientSideEvents(eve => { eve.ActionComplete("complete").Create("create"); })
.AllowPaging()
.PageSettings(page => page.PageSize(200))
.IsResponsive()
.AllowFiltering()
.AllowSorting()
.AllowTextWrap(true)
.ClientSideEvents(eve => { eve.ActionComplete("complete"); })
.FilterSettings(filter => { filter.FilterType(FilterType.Excel); })
.EditSettings(edit => { edit.AllowEditing().EditMode(EditMode.InlineFormTemplate).InlineFormTemplateID("#template").TitleColumn("Resident"); })
//.EditSettings(edit => { edit.AllowEditing().EditMode(EditMode.InlineForm); })
.ToolbarSettings(toolbar =>
{
toolbar.ShowToolbar().ToolbarItems(items =>
{
items.AddTool(ToolBarItems.Edit);
items.AddTool(ToolBarItems.Update);
items.AddTool(ToolBarItems.ExcelExport);
});
})
.Columns(col =>
{
col.Field("EvictionForbearanceID").IsPrimaryKey(true).Visible(false).Add();
col.Field("MarketName").HeaderText("Market").AllowEditing(false).Add();
col.Field("PropertyIdentifier").HeaderText("Property ID").AllowEditing(false).Add();
col.Field("County").HeaderText("County").AllowEditing(false).Add();
col.Field("Resident").HeaderText("Resident").AllowEditing(false).Add();
col.Field("YardiStatus").HeaderText("Yardi Status").AllowEditing(false).Add();
col.Field("DelinquentDate").HeaderText("Delinquent Date").Format("{0:MM/dd/yyyy}").AllowEditing(false).Add();
col.Field("TotalDelinquentBalance").HeaderText("Total Delinquent Balance").AllowEditing(false).Add();
col.Field("DaysInDelinquency").HeaderText("Days In Delinquency").AllowEditing(false).Add();
col.Field("EvictionStatusDate").HeaderText("Changed to Evict Date").Format("{0:MM/dd/yyyy}").AllowEditing(false).Add();
col.Field("JudgementFlag").HeaderText("Judgement?").Width(175).AllowEditing(true).DisplayAsCheckbox().EditType(EditingType.Boolean).Add();
col.Field("ForbearanceAgreementFlag").HeaderText("Forbearance Agreement?").Width(175).AllowEditing().DisplayAsCheckbox().EditType(EditingType.Boolean).Add();
col.Field("YardiTenantLink").HeaderText("Yardi Link").Template(" <a rel='nofollow' href='{{:YardiTenantLink}}'>Yardi</a>").AllowEditing(false).Add(); //render link
col.Field("InferedEvictionWorkFlowStatus").HeaderText("Inferred Eviction Status or Work Flow Status").AllowEditing(true).Add();
})
.ChildGrid(child =>
{
child.Datasource(ds => ds.Json(Model.Payments).UpdateURL("EvictionForbearance/UpdatePayment").InsertURL("EvictionForbearance/InsertPament").Adaptor(AdaptorType.RemoteSaveAdaptor))
.QueryString("EvictionForbearanceID")
.EditSettings(pay => { pay.AllowEditing().EditMode(EditMode.Dialog).AllowAdding().RowPosition(RowPosition.Bottom); })
.ToolbarSettings(toolbar1 =>
{
toolbar1.ShowToolbar().ToolbarItems(items1 =>
{
items1.AddTool(ToolBarItems.Edit);
items1.AddTool(ToolBarItems.Update);
items1.AddTool(ToolBarItems.Add);
});
})
.Columns(col1 =>
{
col1.Field("EvictionForebearanceXrefID").IsPrimaryKey(true).Visible(false).Add();
col1.Field("EvictionForbearanceID").Visible(false).Add();
col1.Field("PaymentDate").HeaderText("Payment Date").Format("{0:MM/dd/yyyy}").EditType(EditingType.Datepicker).AllowEditing(true).Add(); //
col1.Field("PaymentAmount").HeaderText("Payment Amount").Format("{0:C2}").AllowEditing(true).EditType(EditingType.Numeric).NumericEditOptions(new EditorProperties() { DecimalPlaces = 2 }).Add(); //
col1.Field("ActualString").HeaderText("Actual?").AllowEditing(true).Add();
});
})
);
<script id="template" type="text/x-jsrender">
<div class="e-hide">
<input class="e-field e-ejinputtext e-disable" value="{{:MarketName}}" id="EvictGridMarketName" name="MarketName">
<input class="e-field e-ejinputtext e-disable" value="{{:EvictionForbearanceID}}" id="EvictGridEvictionForbearanceID" name="EvictionForbearanceID">
<input class="e-field e-ejinputtext e-disable" value="{{:PropertyIdentifier}}" id="EvictGridPropertyIdentifier" name="PropertyIdentifier">
<input class="e-field e-ejinputtext e-disable" value="{{:County}}" id="EvictGridCounty" name="County">
<input class="e-field e-ejinputtext e-disable" value="{{:Resident}}" id="EvictGridResident" name="Resident">
<input class="e-field e-ejinputtext e-disable" value="{{:YardiStatus}}" id="EvictGridYardiStatus" name="YardiStatus">
<input class="e-datetimepicker e-field e-disable e-js e-input" value="{{:DelinquentDate}}" id="EvictGridDelinquentDate" name="DelinquentDate" disabled="disabled" tabindex="0" aria-atomic="true" aria-live="assertive" aria-disabled="true" placeholder="Select datetime">
<input class="e-field e-ejinputtext e-disable" value="{{:DaysInDelinquency}}" id="EvictGridDaysInDelinquency" name="DaysInDelinquency">
<input class="e-field e-ejinputtext e-disable" value="{{:TotalDelinquentBalance}}" id="EvictGridTotalDelinquentBalance" name="TotalDelinquentBalance">
<input class="e-datetimepicker e-field e-disable e-js e-input" value="{{:EvictionStatusDate}}" id="EvictGridEvictionStatusDate" name="EvictionStatusDate" disabled="disabled" tabindex="0" aria-atomic="true" aria-live="assertive" aria-disabled="true" placeholder="Select datetime">
<input class="e-field e-ejinputtext e-disable" value="{{:JudgementFlag}}" id="EvictGridJudgementFlag" name="JudgementFlag">
<input class="e-field e-ejinputtext e-disable" value="{{:ForbearanceAgreementFlag}}" id="EvictGridForbearanceAgreementFlag" name="ForbearanceAgreementFlag">
<input class="e-field e-ejinputtext e-disable" value="{{:YardiTenantLink}}" id="EvictGridYardiTenantLink" name="YardiTenantLink">
<input class="e-field e-ejinputtext e-disable" value="{{:InferedEvictionWorkFlowStatus}}" id="EvictInferedEvictionWorkFlowStatus" name="InferedEvictionWorkFlowStatus">
</div>
<div class="row">
<div class="col-xs-4">
<center><h4>-Dates-</h4></center>
<hr />
<table cellspacing="10" align="center">
<tr align="center">
<th>Sent to Attorney Date</th>
<td>
<input type="text" value="{{:SentToAttorneyDate}}" id="EvictGridSentToAttorneyDate" name="SentToAttorneyDate" tabindex="0" aria-atomic="true" aria-live="assertive" placeholder="Select date">
</td>
</tr>
<tr align="center">
<th>Court Date</th>
<td>
<input type="text" value="{{:CourtDate}}" id="EvictGridCourtDate" name="CourtDate" tabindex="0" aria-atomic="true" aria-live="assertive" placeholder="Select date">
</td>
</tr>
<tr align="center">
<th>Forbearance Agreement Date</th>
<td>
<input type="text" value="{{:ForbearanceAgreementDate}}" id="EvictGridForbearanceAgreementDate" name="ForbearanceAgreementDate" tabindex="0" aria-atomic="true" aria-live="assertive" placeholder="Select date">
</td>
</tr>
<tr align="center">
<th>Next Payment Date</th>
<td>
<input type="text" value="{{:NextPaymentDate}}" id="EvictGridNextPaymentDate" name="NextPaymentDate" tabindex="0" aria-atomic="true" aria-live="assertive" placeholder="Select date">
</td>
</tr>
<tr align="center">
<th>Sent To Sheriff Date</th>
<td>
<input type="text" value="{{:SentToSheriffDate}}" id="EvictGridSentToSheriffDate" name="SentToSheriffDate" tabindex="0" aria-atomic="true" aria-live="assertive" placeholder="Select date">
</td>
</tr>
<tr align="center">
<th>Satisfied Date</th>
<td>
<input type="text" value="{{:SatisfiedDate}}" id="EvictGridSatisfiedDate" name="SatisfiedDate" tabindex="0" aria-atomic="true" aria-live="assertive" placeholder="Select date">
</td>
</tr>
<tr align="center">
<th>Lockout Date</th>
<td>
<input type="text" value="{{:LockoutDate}}" id="EvictGridLockoutDate" name="LockoutDate" tabindex="0" aria-atomic="true" aria-live="assertive" placeholder="Select date">
</td>
</tr>
</table>
</div>
<div class="col-xs-4">
<center><h4>-Info-</h4></center>
<hr />
</div>
</div>
</script>