@using Kreta.Web.Helpers.Grid;
@using Kreta.Web.Areas.Adatszolgaltatasok.Models
@using Kreta.Web.Helpers
@using Kreta.BusinessLogic.Classes
@using Kreta.Enums.ManualEnums
@using Kreta.Resources
@{
Layout = null;
}
@model MerohelyGridModel
@{
var rowFunctionList = new List
{
new RowFunction { Name = KozmuAdatszolgaltatasResource.FeltoltottKepMegtekintese, ClientAction= "MerohelyHelper.OpenMeroallasImagePopup", IconEnum = GridRowFunctionIconEnum.Kep },
};
var defaultRowFunctionList = new List
{
new RowFunction { Name = IntezmenyResource.Modositas, ClientAction= "MerohelyHelper.OpenMeroallasModositasPopup", IconEnum = GridRowFunctionIconEnum.Modositas },
new RowFunction { Name = IntezmenyResource.Torles, ClientAction= "MerohelyHelper.DeleteMeroallasConfirmWindow", IconEnum = GridRowFunctionIconEnum.Torles }
};
}
@(
Html.KretaGrid(
"MeroallasDetailGrid_" + Model.MerohelyId,
new GridApiUrl("MerohelyApi", "GetMeroallasDetailGrid", new Dictionary { { "merohelyId", Model.MerohelyId.ToString() } }),
useToolBar: false,
allowPaging: false,
allowScrolling: false,
showSorszam: false
)
.Sortable(sortable => sortable
.AllowUnsort(true))
.Columns(columns =>
{
columns.Bound(c => c.MeroallasId).Hidden();
columns.Bound(c => c.Ertek);
columns.Bound(c => c.LeolvasasDatuma).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]);
columns.Bound(c => c.KeppelRendelkezik_BNAME);
})
.ConditionalRowFunction(Html, rowFunctionList, "DetailGridHelper.setRowEditing")
.RowFunction(Html, defaultRowFunctionList)
.FunctionCommand(Html, new List
{
new FunctionCommand { Name = IntezmenyResource.Uj, ClientAction = "function() { MerohelyHelper.OpenMeroallasUjPopup(" + Model.MerohelyId + "); }"}
})
)