Hi all
When I load the page with the following grid, the browser show me this message "Error! The requested URL returned 500 - Internal Server Error"
Could anybody help me please?
That's my code:
(IndexRechte.cshtml)
And that's the Controller:
Thank's a lot!
Marco
When I load the page with the following grid, the browser show me this message "Error! The requested URL returned 500 - Internal Server Error"
Could anybody help me please?
That's my code:
(IndexRechte.cshtml)
@(Html.Telerik().Grid<
GruppeFunktion
>()
.Name("Grid")
.DataKeys(keys =>
{
keys.Add(o => o.GruppeFunktionID);
})
.ToolBar(commands => { commands.SubmitChanges(); })
.DataBinding(dataBinding =>
dataBinding.Ajax()
.Select("_IndexRechte", "Rechte")
.Update("_SaveBatchEditing", "Rechte")
)
.Columns(columns =>
{
columns.Bound(o => o.GruppeFunktionID);
columns.Bound(o => o.visible)
.ClientTemplate("<#=visible? 'ja' : 'nein' #>")
.Title("K")
.Width(12);
})
.ClientEvents(events => events
.OnDataBinding("Grid_onDataBinding")
.OnError("Grid_onError"))
.Editable(editing => editing.Mode(GridEditMode.InCell))
.Scrollable(scrolling => scrolling.Enabled(false).Height("auto")) // ohne Scrolling zerfällt die Tabelle, wenn sie zu breit ist
.TableHtmlAttributes(new { style = "table-layout = fixed" })
.Resizable(resizing => resizing.Columns(true))
.Sortable()
.Filterable()
.Groupable()
.Pageable(paging =>
paging
.PageSize(ViewBag.PageSize)
.Style(ViewBag.PageStyle)
.Position(GridPagerPosition.Bottom)
)
)
And that's the Controller:
[GridAction]
public
ActionResult _IndexRechte()
{
List<GruppeFunktion> gruppeFunktion;
gruppeFunktion = (List<GruppeFunktion>)Session[
"gruppeFunktion"
];
// vorbereitete Geschäftsliste anzeigen
return
View(
new
GridModel<GruppeFunktion> { Data = gruppeFunktion });
}
public
ViewResult IndexRechte(Guid gruppeID)
{
// PageSize
ViewBag.PageSize = PageSizeFunktionliste;
List<GruppeFunktion> gruppeFunktion = (from ObjGF
in
this
.db.GruppeFunktion
where ObjGF.GruppeID == gruppeID
select ObjGF).ToList();
Session[
"gruppeFunktion"
] = gruppeFunktion;
if
(gruppeFunktion.ToList().Count > PageSizeFunktionliste)
{
ViewBag.PageStyle = GridPagerStyles.NextPreviousAndNumeric;
}
else
{
ViewBag.PageStyle = GridPagerStyles.Status;
}
return
View();
}
Thank's a lot!
Marco