Javascript 剑道网格自定义弹出编辑器模板

Javascript 剑道网格自定义弹出编辑器模板,javascript,kendo-ui,telerik,kendo-grid,kendo-asp.net-mvc,Javascript,Kendo Ui,Telerik,Kendo Grid,Kendo Asp.net Mvc,我有一个剑道网格链接到一个自定义弹出编辑器模板。我没有使用Kendo提供的默认添加按钮,因为我需要几个不同的按钮,这些按钮将附加参数传递给我的on_edit函数,该函数绑定到edit事件。在我第一次单击“添加”按钮时,一切都正常工作,但在编辑器窗口上单击“取消”按钮后,按任何“添加”按钮都会在网格中显示一个空行(好像由编辑器填充),但弹出编辑器窗口本身不会显示。当我从公式中完全删除模板时,代码都正常工作,这使我认为问题不在于我的自定义添加按钮,而在于编辑器模板 网格声明 @(Html.Kendo

我有一个剑道网格链接到一个自定义弹出编辑器模板。我没有使用Kendo提供的默认添加按钮,因为我需要几个不同的按钮,这些按钮将附加参数传递给我的on_edit函数,该函数绑定到edit事件。在我第一次单击“添加”按钮时,一切都正常工作,但在编辑器窗口上单击“取消”按钮后,按任何“添加”按钮都会在网格中显示一个空行(好像由编辑器填充),但弹出编辑器窗口本身不会显示。当我从公式中完全删除模板时,代码都正常工作,这使我认为问题不在于我的自定义添加按钮,而在于编辑器模板

网格声明

@(Html.Kendo().Grid<ScheduleProcess.Process>
()
.Name("grid")
.Columns(columns =>
{
    columns.Bound(c => c.TriggerName);
    columns.Bound(c => c.Description);
    columns.Bound(c => c.Category);
    columns.Bound(c => c.Enabled).ClientTemplate("<input type='checkbox' ${ Enabled == true ? checked='checked' : '' } disabled />").Width(75);
    columns.ForeignKey(c => c.TriggerType, EnumHelper.GetSelectList(typeof(ScheduleProcess.TriggerTypes)).ToList(), "Value", "Text");
    columns.Bound(c => c.LastRun).Format("{0:MM/dd/yy hh:mm:ss tt}");
    columns.Bound(c => c.LastUnSuccessfulRun).Format("{0:MM/dd/yy hh:mm:ss tt}");
    columns.Bound(c => c.EventId);
    columns.Command(c => c.Edit().UpdateText("Save"));
    columns.Command(c => c.Destroy());
    //Hidden Columns
    columns.ForeignKey(c => c.ProcessThreadType, EnumHelper.GetSelectList(typeof(ScheduleProcess.ThreadType)).ToList(), "Value", "Text").Hidden(true);
    columns.Bound(c => c.RunInterval).Hidden(true);
})
.HtmlAttributes(new { style = "height: 750px;" })
.Resizable(resize => resize.Columns(true))
.Scrollable(scrollable => scrollable.Virtual(true))
.Sortable()
.Selectable()
.Editable(edit => edit.Mode(GridEditMode.PopUp).TemplateName("ProcessesEditor"))
.ToolBar(toolbar =>
{
toolbar.Template(
    @<text>
        @(Html.Kendo().Button()
            .Content("Add One Time Trigger")
            .Name("OneTimeTriggerAdd")
            .Events(e => e.Click("AddOneTimeTrigger"))
        )
        &nbsp;
        @(Html.Kendo().Button()
            .Content("Add Interval Trigger")
            .Name("IntervalTriggerAdd")
            .Events(e => e.Click("AddIntervalTrigger"))
        )
        &nbsp;
        @(Html.Kendo().Button()
            .Content("Add Daily Trigger")
            .Name("DailyTriggerAdd")
            .Events(e => e.Click("AddDailyTrigger"))
        )
        &nbsp;
        @(Html.Kendo().Button()
            .Content("Add Weekly Trigger")
            .Name("WeeklyTriggerAdd")
            .Events(e => e.Click("AddWeeklyTrigger"))
        )
        &nbsp;
        @(Html.Kendo().Button()
            .Content("Add Monthly Trigger")
            .Name("MonthlyTriggerAdd")
            .Events(e => e.Click("AddMonthlyTrigger"))
        )
        <br /><br />
        &nbsp;Category:&nbsp;
        @(Html.Kendo().MultiSelect()
                    .Name("CategoryMS")
                    .BindTo((System.Collections.IEnumerable)ViewData["Categories"])
                    .DataTextField("Category")
                    .DataValueField("Category")
                    .Events(e => e.Change("Refresh"))
                    .AutoClose(false)

        )
        &nbsp;
        @(Html.Kendo().Button()
                    .Name("Refresh")
                    .Events(e => e.Click("Refresh"))
                    .Content("Search")
        )
        &nbsp;
        <a class="k-button k-button-icontext k-grid-excel" href="#"><span class="k-icon k-i-excel"></span>Export</a>

    </text>);
})
.Excel(excel => excel
    .FileName("Process_Export.xlsx")
)
.DataSource(dataSource => dataSource
    .Ajax()
    .Events(e => e.Error("onError").RequestEnd("update_grid"))
    .Model(model => {
        model.Id(a => a.TriggerId);
        model.Field(a => a.TriggerId).DefaultValue(0);
        model.Field(a => a.Category);
        model.Field(a => a.DayOfWeek);
        model.Field(a => a.Description);
        model.Field(a => a.DisableAfterFailure);
        model.Field(a => a.Enabled);
        model.Field(a => a.EstimatedProcessRunTime);
        model.Field(a => a.EventId);
        model.Field(a => a.LastRun).DefaultValue(DateTime.MinValue);
        model.Field(a => a.LastUnSuccessfulRun).DefaultValue(DateTime.MinValue);
        model.Field(a => a.MethodParameters);
        model.Field(a => a.ProcessParameters);
        model.Field(a => a.ProcessThreadType);
        model.Field(a => a.Retries);
        model.Field(a => a.RunEvery);
        model.Field(a => a.RunEveryDays);
        model.Field(a => a.RunEveryWeeks);
        model.Field(a => a.RunInterval);
        model.Field(a => a.RunOnDay);
        model.Field(a => a.RunOnDayOf);
        model.Field(a => a.RunOnlyOnWeekdays);
        model.Field(a => a.RunOnWeek);
        model.Field(a => a.RunProcess);
        model.Field(a => a.SelectedEndpointName);
        model.Field(a => a.SelectedMethodName);
        model.Field(a => a.ServiceAddress);
        model.Field(a => a.StartDate);
        model.Field(a => a.StartTime);
        model.Field(a => a.TriggerName);
        model.Field(a => a.TriggerType);
        model.Field(a => a.WaitTimeTillRetry);
        model.Field(a => a.WeekType);
    })
    .Create(update => update.Action("Process_Create", "Grid"))
    .Update(update => update.Action("Process_Update", "Grid"))
    .Destroy(update => update.Action("Process_Destroy", "Grid"))
    .Read(read => read.Action("Process_Read", "Grid"))
    .PageSize(500)
)
)

恢复所有预期功能并完全修复问题

添加按钮的Javascript函数

function AddOneTimeTrigger() {
    NewTriggerType = "4"; //OneTime
    var grid = $("#grid").data("kendoGrid");
    grid.addRow();
}

function AddIntervalTrigger() {
    NewTriggerType = "0"; //Interval
    var grid = $("#grid").data("kendoGrid");
    grid.addRow();
}

function AddDailyTrigger() {
    NewTriggerType = "1"; //Daily
    var grid = $("#grid").data("kendoGrid");
    grid.addRow();
}

function AddWeeklyTrigger() {
    NewTriggerType = "2"; //Weekly
    var grid = $("#grid").data("kendoGrid");
    grid.addRow();
}

function AddMonthlyTrigger() {
    NewTriggerType = "3"; //Monthly
    var grid = $("#grid").data("kendoGrid");
    grid.addRow();
}
编辑器模板

@model ScheduleProcess.Process

@Html.HiddenFor(model => model.TriggerId)

@* Name *@
<div style="text-align:center">
    @Html.LabelFor(model => model.TriggerName, new { style = "color:#00FF00" })
    &nbsp;&nbsp;&nbsp;
    @Html.TextBoxFor(model => model.TriggerName, new { style = "width:75%; font-size:90%" })
</div>

@* Description *@
<div style="text-align:center">
    @Html.LabelFor(model => model.Description, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.TextBoxFor(model => model.Description, new { style = "width:75%; font-size:90%" })
</div>

@* Category *@
<div style="text-align:center">
    @Html.LabelFor(model => model.Category, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.Category)
</div>

@* Enabled *@
<div style="text-align:center">
    @Html.LabelFor(model => model.Enabled, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.Enabled)
</div>

@* Disable After Failure *@
<div style="text-align:center">
    @Html.LabelFor(model => model.DisableAfterFailure, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.DisableAfterFailure)
</div>

@* Process Thread Type *@
<div style="text-align:center">
    @Html.LabelFor(model => model.ProcessThreadType, new { style = "color:#00FF00" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.ProcessThreadType)
</div>

@* Estimated Process Run Time *@
<div style="text-align:center">
    @Html.LabelFor(model => model.EstimatedProcessRunTime, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.EstimatedProcessRunTime)
</div>

@* Number of Tries *@
<div style="text-align:center">
    @Html.LabelFor(model => model.Retries, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.Retries)
</div>

@* Wait Time Until Retry *@
<div style="text-align:center">
    @Html.LabelFor(model => model.WaitTimeTillRetry, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.WaitTimeTillRetry)
</div>

@* Service Address *@
<div style="text-align:center">
    @Html.LabelFor(model => model.ServiceAddress, new { style = "color:#00FF00" })
    &nbsp;&nbsp;&nbsp;
    @Html.TextBoxFor(model => model.ServiceAddress, new { style="width:75%; font-size:70%"})
</div>

@* Endpoint Name *@
<div style="text-align:center">
    @Html.LabelFor(model => model.SelectedEndpointName, new { style = "color:#00FF00" })
    &nbsp;&nbsp;&nbsp;
    @Html.TextBoxFor(model => model.SelectedEndpointName, new { style = "width:75%; font-size:90%" })
</div>

@* Process Name *@
<div style="text-align:center">
    @Html.LabelFor(model => model.SelectedMethodName, new { style = "color:#00FF00" })
    &nbsp;&nbsp;&nbsp;
    @Html.TextBoxFor(model => model.SelectedMethodName, new { style = "width:75%; font-size:90%" })
</div>

@* Process Parameters *@
<div style="text-align:center">
    @Html.LabelFor(model => model.MethodParameters, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.MethodParameters)
</div>

@* Process Parameters(| delimeter) *@
<div style="text-align:center">
    @Html.LabelFor(model => model.ProcessParameters, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.TextBoxFor(model => model.ProcessParameters, new { style = "width:75%; font-size:90%" })
</div>

@* Event Log ID *@
<div style="text-align:center">
    @Html.LabelFor(model => model.EventId, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.EventId)
</div>

@* Trigger Type *@
<div style="text-align:center">
    @Html.LabelFor(model => model.TriggerType, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.TriggerType)
</div>

@* Last Successful Run *@
<div style="text-align:center">
    @Html.LabelFor(model => model.LastRun, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @(Html.TextBoxFor(model => model.LastRun, "{0:MM/dd/yyyy hh:mm:ss tt}", new { type = "datetime-local" }))
</div>

@* Last Attempted Run *@
<div style="text-align:center">
    @Html.LabelFor(model => model.LastUnSuccessfulRun, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.TextBoxFor(model => model.LastUnSuccessfulRun, "{0:MM/dd/yyyy hh:mm:ss tt}", new { type = "datetime-local" })
</div>

@* Run Interval *@
<div style="text-align:center" id="RunIntervalDiv">
    @Html.LabelFor(model => model.RunInterval, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.Kendo().IntegerTextBoxFor(model => model.RunInterval.Hours).HtmlAttributes(new { style = "width: 30px;" }).Spinners(false).Max(23).Min(0).RestrictDecimals(true).Decimals(0).Format("00") :
    @Html.Kendo().IntegerTextBoxFor(model => model.RunInterval.Minutes).HtmlAttributes(new { style = "width: 30px;" }).Spinners(false).Max(59).Min(0).RestrictDecimals(true).Decimals(0).Format("00") :
    @Html.Kendo().IntegerTextBoxFor(model => model.RunInterval.Seconds).HtmlAttributes(new { style = "width: 30px;" }).Spinners(false).Max(59).Min(0).RestrictDecimals(true).Decimals(0).Format("00")
</div>

@* Start Date *@
<div style="text-align:center">
    @Html.LabelFor(model => model.StartDate, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @(Html.Kendo().DatePickerFor(model => model.StartDate))
</div>

@* Start Time *@
<div style="text-align:center">
    @Html.LabelFor(model => model.StartTime, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @(Html.Kendo().TimePickerFor(model => model.StartTime))
</div>

@* Run Only On Weekdays *@
<div style="text-align:center" id="RunOnlyOnWeekdaysDiv">
    @Html.LabelFor(model => model.RunOnlyOnWeekdays, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.RunOnlyOnWeekdays)
</div>

@* Run Every *@
<div style="text-align:center" id="RunEveryDiv">
    @Html.LabelFor(model => model.RunEvery, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.RunEvery)
</div>

@* Days *@
<div style="text-align:center" id="RunEveryDaysDiv">
    @Html.LabelFor(model => model.RunEveryDays, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.RunEveryDays)
</div>

@* Run Every Week *@
<div style="text-align:center" id="RunEveryWeeksDiv">
    @Html.LabelFor(model => model.RunEveryWeeks, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.RunEveryWeeks)
</div>

@* Run On *@
<div style="text-align:center" id="RunOnDayDiv">
    @Html.LabelFor(model => model.RunOnDay, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.RunOnDay)
</div>

@* Day *@
<div style="text-align:center" id="RunOnDayOfDiv">
    @Html.LabelFor(model => model.RunOnDayOf, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.RunOnDayOf)
</div>

@* Run On the *@
<div style="text-align:center" id="RunOnWeekDiv">
    @Html.LabelFor(model => model.RunOnWeek, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.RunOnWeek)
</div>

@* Week *@
<div style="text-align:center" id="WeekTypeDiv">
    @Html.LabelFor(model => model.WeekType, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.WeekType)
</div>

@* Day of Week *@
<div style="text-align:center" id="DayOfWeekDiv">
    @Html.LabelFor(model => model.DayOfWeek, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.DayOfWeek)
</div>
@model ScheduleProcess.Process
@Html.HiddenFor(model=>model.TriggerId)
@*名字*@
@LabelFor(model=>model.TriggerName,新的{style=“color:#00FF00”})
@Html.TextBoxFor(model=>model.TriggerName,新的{style=“width:75%;font size:90%”)
@*描述*@
@LabelFor(model=>model.Description,新的{style=“color:#ffffff99;字体大小:80%”)
@Html.TextBoxFor(model=>model.Description,新的{style=“width:75%;font size:90%”)
@*类别*@
@LabelFor(model=>model.Category,新的{style=“color:#ffffff99;字体大小:80%”)
@EditorFor(model=>model.Category)
@*启用*@
@LabelFor(model=>model.Enabled,新的{style=“color:#ffffff99;字体大小:80%”)
@EditorFor(model=>model.Enabled)
@*故障后禁用*@
@LabelFor(model=>model.DisableAfterFailure,new{style=“color:#ffffff99;font size:80%”)
@EditorFor(model=>model.DisableAfterFailure)
@*进程线程类型*@
@LabelFor(model=>model.ProcessThreadType,新的{style=“color:#00FF00”})
@EditorFor(model=>model.ProcessThreadType)
@*估计进程运行时间*@
@LabelFor(model=>model.EstimatedProcessRunTime,新{style=“color:#ffff99;font size:80%”)
@EditorFor(model=>model.EstimatedProcessRunTime)
@*尝试次数*@
@LabelFor(model=>model.Retries,新的{style=“color:#ffffff99;字体大小:80%”)
@EditorFor(model=>model.Retries)
@*等待时间,直到重试*@
@LabelFor(model=>model.WaitTimeTillRetry,新的{style=“color:#ffff99;字体大小:80%”)
@EditorFor(model=>model.WaitTimeTillRetry)
@*服务地址*@
@LabelFor(model=>model.ServiceAddress,新的{style=“color:#00FF00”})
@TextBoxFor(model=>model.ServiceAddress,新的{style=“width:75%;font size:70%”)
@*端点名称*@
@LabelFor(model=>model.SelectedEndpointName,新的{style=“color:#00FF00”})
@Html.TextBoxFor(model=>model.SelectedEndpointName,新建{style=“width:75%;font size:90%”)
@*进程名称*@
@LabelFor(model=>model.SelectedMethodName,新的{style=“color:#00FF00”})
@Html.TextBoxFor(model=>model.SelectedMethodName,新建{style=“width:75%;font size:90%”)
@*工艺参数*@
@LabelFor(model=>model.MethodParameters,新的{style=“color:#ffffff99;字体大小:80%”)
@EditorFor(model=>model.MethodParameters)
@*工艺参数(| delimeter)*@
@LabelFor(model=>model.ProcessParameters,新的{style=“color:#ffffff99;字体大小:80%”)
@TextBoxFor(model=>model.ProcessParameters,新的{style=“width:75%;font size:90%”)
@*事件日志ID*@
@LabelFor(model=>model.EventId,新的{style=“color:#ffffff99;字体大小:80%”)
@EditorFor(model=>model.EventId)
@*触发类型*@
@LabelFor(model=>model.TriggerType,新的{style=“color:#ffffff99;字体大小:80%”)
@EditorFor(model=>model.TriggerType)
@*最后一次成功运行*@
@LabelFor(model=>model.LastRun,新的{style=“color:#ffffff99;字体大小:80%”)
@(Html.TextBoxFor(model=>model.LastRun,“{0:MM/dd/yyyy hh:MM:ss tt}”,new{type=“datetime local”}))
@*上次尝试运行*@
@LabelFor(model=>model.LastUnSuccessfulRun,新的{style=“color:#ffff99;font size:80%”)
@Html.TextBoxFor(model=>model.LastUnSuccessfulRun,“{0:MM/dd/yyyy hh:MM:ss tt}”,new{type=“datetime local”})
@*运行间隔*@
@LabelFor(model=>model.RunInterval,新的{style=“color:#ffffff99;字体大小:80%”)
@Html.Kendo().IntegerTextBoxFor(model=>model.RunInterval.Hours).HtmlAttributes(new{style=“width:30px;”}).Spinners(false).Max(23).Min(0).RestrictDecimals(true).Decimals(0).Format(“00”):
@Html.Kendo().IntegerTextBoxFor(model=>model.RunInterval.Minutes).HtmlAttributes(new{style=“width:30px;”}).Spinners(false).Max(59).Min(0).RestrictDecimals(true).Decimals(0).Format(“00”):
@Html.Kendo().IntegerTextBoxFor(model=>model.RunInterval.Seconds).HtmlAttributes(new{style=“width:30px;”}).Spinners(false).Max(59).Min(0).RestrictDecimals(true).Decimals(0).Format(“00”)
@*开始日期*@
@LabelFor(model=>model.StartDate,新的{style=“color:#ffffff99;字体大小:80%”)
@(Html.Kendo().DatePickerFor(model=>model.StartDate))
@*开始时间*@
@LabelFor(model=>model.StartTime,新的{style=“color:#ffffff99;字体大小:80%”)
@(Html.Kendo().TimePickerFor(model=>model.StartTime))
@*仅在工作日运行*@
@LabelFor(model=>model.RunOnlyOnWeekdays,新的{style=“color:#ffff99;font size:80%”)
@Html.EditorFor(model=>model.RunOnlyOnWeekdays)
@*跑遍*@
@LabelFor(model=>model.RunEvery,新{样式=
function AddOneTimeTrigger() {
    NewTriggerType = "4"; //OneTime
    var grid = $("#grid").data("kendoGrid");
    grid.addRow();
}

function AddIntervalTrigger() {
    NewTriggerType = "0"; //Interval
    var grid = $("#grid").data("kendoGrid");
    grid.addRow();
}

function AddDailyTrigger() {
    NewTriggerType = "1"; //Daily
    var grid = $("#grid").data("kendoGrid");
    grid.addRow();
}

function AddWeeklyTrigger() {
    NewTriggerType = "2"; //Weekly
    var grid = $("#grid").data("kendoGrid");
    grid.addRow();
}

function AddMonthlyTrigger() {
    NewTriggerType = "3"; //Monthly
    var grid = $("#grid").data("kendoGrid");
    grid.addRow();
}
@model ScheduleProcess.Process

@Html.HiddenFor(model => model.TriggerId)

@* Name *@
<div style="text-align:center">
    @Html.LabelFor(model => model.TriggerName, new { style = "color:#00FF00" })
    &nbsp;&nbsp;&nbsp;
    @Html.TextBoxFor(model => model.TriggerName, new { style = "width:75%; font-size:90%" })
</div>

@* Description *@
<div style="text-align:center">
    @Html.LabelFor(model => model.Description, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.TextBoxFor(model => model.Description, new { style = "width:75%; font-size:90%" })
</div>

@* Category *@
<div style="text-align:center">
    @Html.LabelFor(model => model.Category, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.Category)
</div>

@* Enabled *@
<div style="text-align:center">
    @Html.LabelFor(model => model.Enabled, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.Enabled)
</div>

@* Disable After Failure *@
<div style="text-align:center">
    @Html.LabelFor(model => model.DisableAfterFailure, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.DisableAfterFailure)
</div>

@* Process Thread Type *@
<div style="text-align:center">
    @Html.LabelFor(model => model.ProcessThreadType, new { style = "color:#00FF00" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.ProcessThreadType)
</div>

@* Estimated Process Run Time *@
<div style="text-align:center">
    @Html.LabelFor(model => model.EstimatedProcessRunTime, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.EstimatedProcessRunTime)
</div>

@* Number of Tries *@
<div style="text-align:center">
    @Html.LabelFor(model => model.Retries, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.Retries)
</div>

@* Wait Time Until Retry *@
<div style="text-align:center">
    @Html.LabelFor(model => model.WaitTimeTillRetry, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.WaitTimeTillRetry)
</div>

@* Service Address *@
<div style="text-align:center">
    @Html.LabelFor(model => model.ServiceAddress, new { style = "color:#00FF00" })
    &nbsp;&nbsp;&nbsp;
    @Html.TextBoxFor(model => model.ServiceAddress, new { style="width:75%; font-size:70%"})
</div>

@* Endpoint Name *@
<div style="text-align:center">
    @Html.LabelFor(model => model.SelectedEndpointName, new { style = "color:#00FF00" })
    &nbsp;&nbsp;&nbsp;
    @Html.TextBoxFor(model => model.SelectedEndpointName, new { style = "width:75%; font-size:90%" })
</div>

@* Process Name *@
<div style="text-align:center">
    @Html.LabelFor(model => model.SelectedMethodName, new { style = "color:#00FF00" })
    &nbsp;&nbsp;&nbsp;
    @Html.TextBoxFor(model => model.SelectedMethodName, new { style = "width:75%; font-size:90%" })
</div>

@* Process Parameters *@
<div style="text-align:center">
    @Html.LabelFor(model => model.MethodParameters, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.MethodParameters)
</div>

@* Process Parameters(| delimeter) *@
<div style="text-align:center">
    @Html.LabelFor(model => model.ProcessParameters, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.TextBoxFor(model => model.ProcessParameters, new { style = "width:75%; font-size:90%" })
</div>

@* Event Log ID *@
<div style="text-align:center">
    @Html.LabelFor(model => model.EventId, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.EventId)
</div>

@* Trigger Type *@
<div style="text-align:center">
    @Html.LabelFor(model => model.TriggerType, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.TriggerType)
</div>

@* Last Successful Run *@
<div style="text-align:center">
    @Html.LabelFor(model => model.LastRun, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @(Html.TextBoxFor(model => model.LastRun, "{0:MM/dd/yyyy hh:mm:ss tt}", new { type = "datetime-local" }))
</div>

@* Last Attempted Run *@
<div style="text-align:center">
    @Html.LabelFor(model => model.LastUnSuccessfulRun, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.TextBoxFor(model => model.LastUnSuccessfulRun, "{0:MM/dd/yyyy hh:mm:ss tt}", new { type = "datetime-local" })
</div>

@* Run Interval *@
<div style="text-align:center" id="RunIntervalDiv">
    @Html.LabelFor(model => model.RunInterval, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.Kendo().IntegerTextBoxFor(model => model.RunInterval.Hours).HtmlAttributes(new { style = "width: 30px;" }).Spinners(false).Max(23).Min(0).RestrictDecimals(true).Decimals(0).Format("00") :
    @Html.Kendo().IntegerTextBoxFor(model => model.RunInterval.Minutes).HtmlAttributes(new { style = "width: 30px;" }).Spinners(false).Max(59).Min(0).RestrictDecimals(true).Decimals(0).Format("00") :
    @Html.Kendo().IntegerTextBoxFor(model => model.RunInterval.Seconds).HtmlAttributes(new { style = "width: 30px;" }).Spinners(false).Max(59).Min(0).RestrictDecimals(true).Decimals(0).Format("00")
</div>

@* Start Date *@
<div style="text-align:center">
    @Html.LabelFor(model => model.StartDate, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @(Html.Kendo().DatePickerFor(model => model.StartDate))
</div>

@* Start Time *@
<div style="text-align:center">
    @Html.LabelFor(model => model.StartTime, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @(Html.Kendo().TimePickerFor(model => model.StartTime))
</div>

@* Run Only On Weekdays *@
<div style="text-align:center" id="RunOnlyOnWeekdaysDiv">
    @Html.LabelFor(model => model.RunOnlyOnWeekdays, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.RunOnlyOnWeekdays)
</div>

@* Run Every *@
<div style="text-align:center" id="RunEveryDiv">
    @Html.LabelFor(model => model.RunEvery, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.RunEvery)
</div>

@* Days *@
<div style="text-align:center" id="RunEveryDaysDiv">
    @Html.LabelFor(model => model.RunEveryDays, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.RunEveryDays)
</div>

@* Run Every Week *@
<div style="text-align:center" id="RunEveryWeeksDiv">
    @Html.LabelFor(model => model.RunEveryWeeks, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.RunEveryWeeks)
</div>

@* Run On *@
<div style="text-align:center" id="RunOnDayDiv">
    @Html.LabelFor(model => model.RunOnDay, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.RunOnDay)
</div>

@* Day *@
<div style="text-align:center" id="RunOnDayOfDiv">
    @Html.LabelFor(model => model.RunOnDayOf, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.RunOnDayOf)
</div>

@* Run On the *@
<div style="text-align:center" id="RunOnWeekDiv">
    @Html.LabelFor(model => model.RunOnWeek, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.RunOnWeek)
</div>

@* Week *@
<div style="text-align:center" id="WeekTypeDiv">
    @Html.LabelFor(model => model.WeekType, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.WeekType)
</div>

@* Day of Week *@
<div style="text-align:center" id="DayOfWeekDiv">
    @Html.LabelFor(model => model.DayOfWeek, new { style = "color:#ffff99; font-size:80%" })
    &nbsp;&nbsp;&nbsp;
    @Html.EditorFor(model => model.DayOfWeek)
</div>
<head>
    @Scripts.Render("~/bundles/kendo")
</head>