@using Kreta.Resources; @using Kreta.Web.Helpers.Grid; @using Kreta.Enums.ManualEnums; @using Kreta.BusinessLogic.Classes; @using Kreta.Web.Areas.GRModul.Models; @model BeszerzesiIgenySearchModel @{ Layout = "~/Views/Shared/_MasterLayout.cshtml"; } @section AddSearchPanel { @using (Html.SearchPanelSideBar("searchForm", "BeszerzesiIgenyGrid")) { @Html.KretaDatePickerFor(x => x.SrcIgenylesKezdete).RenderSearchPanelSideBar() @Html.KretaTextBoxFor(x => x.SrcAnyag).RenderSearchPanelSideBar() @Html.KretaComboBoxFor(x => x.SrcStatusz, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperEnumApi", action = "GetBeszerzesiIgenyStatuszList" }), "Text", "Value").RenderSearchPanelSideBar() } } @{ var grid = Html.KretaGrid ( name: "BeszerzesiIgenyGrid", getUrl: new GridApiUrl("BeszerzesiIgenyApi", "GetBeszerzesiIgenyGrid", new Dictionary { }), dataParameterFunction: "searchForm", allowScrolling: true ) .AutoBind(true) .Sortable(sortable => sortable .AllowUnsort(true) .SortMode(GridSortMode.MultipleColumn)); grid.Columns(columns => { columns.Bound(c => c.IgenylesKezdete).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]); columns.Bound(c => c.Anyag); columns.Bound(c => c.StatuszId_DNAME); }); var rowFunctions = new List { new RowFunction {Name = CommonResource.Adatok, ClientAction = "BeszerzesiIgenyHelper.openBeszerzesiIgenyModifyPopUp", IconEnum = GridRowFunctionIconEnum.Modositas}, new RowFunction {Name = CommonResource.Adatok, ClientAction = "BeszerzesiIgenyHelper.openBeszerzesiIgenyDetailWindow", IconEnum = GridRowFunctionIconEnum.Adatok} }; var functionCommands = new List { new FunctionCommand { Name = GRModulResource.UjBeszerzesiIgenyRogzites, ClientAction = "BeszerzesiIgenyHelper.openBeszerzesiIgenyNewWindow" } }; grid.RowFunction(Html, rowFunctions); grid.FunctionCommand(Html, functionCommands); if (Model.IsVezeto) { grid.Columns(column => { column.Template(@).Width(140).ClientTemplate( @" #if(StatuszId == 105228) { # #}# "); }); } }
@( grid )