@using Kreta.Web.Helpers.Grid @using Kreta.Web.Helpers @using Kreta.Web.Areas.Leptetes.Models @using Kreta.Resources @{ var grid = Html.KretaGrid( "OsztalyLeptetesGrid", new GridApiUrl("OsztalyLeptetesApi", "GetOsztalyLeptetesGrid"), allowFilterable: false, allowSorting: true, useToolBar: true ).TableHtmlAttributes(new { @class = "tableLayoutFixed" }); grid.Columns(columns => { columns.Bound(x => x.Tanev).Width("100px"); columns.Bound(x => x.OsztalyNeve).Width("200px"); columns.Bound(x => x.Evfolyam).Width("100px"); }); grid.Columns(columns => { columns.Bound(x => x.KovTanev).Width("100px").Sortable(false); columns.Bound(x => x.OsztalyJavasoltNeve).Width("200px").Sortable(false); columns.Bound(x => x.JavasoltEvfolyam).Width("100px").Sortable(false); }); grid.Columns(column => { column.Template(@).ClientTemplate( grid.TextBoxForColumnTemplate(Html.For(), x => x.EditOsztalyNeve) ).Title(LeptetesResource.OsztalyNeve).Width(200); }); grid.Columns(column => { column.Template(@).ClientTemplate( grid.ComboBoxForColumnTemplateWidthValue(Html.For(), x => x.EditEvfolyam, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "ComboBoxHelperApi", action = "GetEvfolyamListForCombo" })) ).Title(LeptetesResource.Evfolyam).Width(200); }); grid.Sortable(sortable => sortable.AllowUnsort(true).SortMode(GridSortMode.MultipleColumn)); grid.SelectBoxColumn(Html, LeptetesResource.Letrehozas, width: 100); grid.FunctionCommand(Html, new List() { new FunctionCommand() { Name = @LeptetesResource.AKijeloltOsztalyokLetrehozasaKovTanevben, ClientAction = "LeptetesHelper.saveOsztalyLeptetes()" } }); }
@(grid)