@using Kreta.Enums.ManualEnums @using Kreta.Web.Helpers @using Kreta.Web.Helpers.Grid @using Kreta.Web.Areas.TanuloErtekeles.Models @model ErettsegiEredmenyekGridModel @{ var gridName = "ErettsegiEredmenyekDetailGrid_" + Model.ID; var formName = "ErettsegiEredmenyekDetailForm_" + Model.ID; } @{ var grid = Html.KretaGrid( gridName, new GridApiUrl("ErettsegiEredmenyekApi", "GetErettsegiEredmenyekDetailGrid", new Dictionary { { "tanuloId", Model.ID } }), allowFilterable: false, allowPaging: false, pageSizes: null, dataBoundAdditionalFunction: "ErettsegiEredmenyekDetailHelper.dataBoundAdditionalFunction('" + Model.ID + "')" ) .ComboBoxForColumn(Html, ErettsegiEredmenyekResource.Tantargy, Model.ErettsegiTantargyList, m => m.ErettsegiTantargyId, classList: new List { "gridInputMaxWidth" }, width: 350) .ComboBoxForColumn(Html, ErettsegiEredmenyekResource.Szint, Model.ErettsegiSzintList, m => m.ErettsegiSzintId, classList: new List { "gridInputMaxWidth" }, width: 150) .ComboBoxForColumn(Html, ErettsegiEredmenyekResource.Tipus, Model.ErettsegiTipusList, m => m.ErettsegiTipusId, classList: new List { "gridInputMaxWidth" }, width: 150) .NumericBoxForColumn(Html, ErettsegiEredmenyekResource.IrasbeliPontszam, m => m.IrasbeliPontszam, 0, Model.IrasbeliMaxPontszam, 0, 100) .NumericBoxForColumn(Html, ErettsegiEredmenyekResource.SzobeliPontszam, m => m.SzobeliPontszam, 0, Model.SzobeliMaxPontszam, 0, 100) .NumericBoxForColumn(Html, ErettsegiEredmenyekResource.GyakorlatiPontszam, m => m.GyakorlatiPontszam, 0, Model.GyakorlatiMaxPontszam, 0, 100) .TextBoxForColumn(Html, ErettsegiEredmenyekResource.Megjegyzes, m => m.Megjegyzes, new Dictionary { { "maxlength", 1000 } }, 150) .Columns(columns => { columns.Bound(c => c.OsszPontszam).HtmlAttributes(new { @class = "kozepre" }).HeaderHtmlAttributes(new { @class = "kozepre" }).Width(100); columns.Bound(c => c.Szazalek).HtmlAttributes(new { @class = "kozepre" }).HeaderHtmlAttributes(new { @class = "kozepre" }).Width(60).Sortable(false); columns.Bound(c => c.Erdemjegy).HtmlAttributes(new { @class = "kozepre" }).HeaderHtmlAttributes(new { @class = "kozepre" }).Width(75).Sortable(false); }) .RowFunction(Html, new List { new RowFunction {Name = CommonResource.Torles, ClientAction = "function(e) { ErettsegiEredmenyekDetailHelper.delete(e, '" + Model.ID + "') }", IconEnum = GridRowFunctionIconEnum.Torles} }) .FunctionCommand(Html, new List { new FunctionCommand {Name = CommonResource.Uj, ClientAction = "function() { ErettsegiEredmenyekDetailHelper.new('" + Model.ID + "') }"} }); }
@using (Html.KretaForm(formName)) { @Html.KretaValidationSummary() @Html.HiddenFor(m => m.ID) } @(grid)