Hello,
I m using VS2012 and I m working on a MVC 4 project with the trial version of Kendo.I've managed to implement a simple grid and got some basic functionality.
My controller has these 2 methods
And in my view i have this header
and the grid code is
As i said grid is showing the results and pagination.But a)Selectable does not work neither in Chrome-Firefox
b)Sortable is always giving me a json result from server side.I cannot enable client sorting besides i wrote my code exactly the same
as kendo mvc examples. c)ServerOperation(false) still does not disables server side sorting.d)I ve added to web.config this line
<modules runAllManagedModulesForAllRequests="true" /> but again no client side sorting.
Any ideas on what is wrong with the above?
Thanx in advance
I m using VS2012 and I m working on a MVC 4 project with the trial version of Kendo.I've managed to implement a simple grid and got some basic functionality.
My controller has these 2 methods
private static IEnumerable<
MemberViewModel
> GetMembers()
{
var context = new EntityContext();
return context.Members.Select(mem => new MemberViewModel
{
MemberId=mem.MemberId,
Name=mem.FirstName,
SurName = mem.LastName
});
}
public ActionResult Members_Read([DataSourceRequest] DataSourceRequest request)
{
return Json(GetMembers().ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
}
<header>
<link href="~/Styles/kendo.common.min.css" rel="stylesheet" />
<link href="~/Styles/kendo.default.min.css" rel="stylesheet" />
<script src="~/Scripts/jquery-1.9.0.min.js"></script>
<script src="~/Scripts/kendo.all.min.js"></script>
<script src="~/Scripts/kendo.aspnetmvc.min.js"></script>
</header>
<link href="~/Styles/kendo.common.min.css" rel="stylesheet" />
<link href="~/Styles/kendo.default.min.css" rel="stylesheet" />
<script src="~/Scripts/jquery-1.9.0.min.js"></script>
<script src="~/Scripts/kendo.all.min.js"></script>
<script src="~/Scripts/kendo.aspnetmvc.min.js"></script>
</header>
(Html.Kendo().Grid(Model)
.Name("Grid")
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(false)
.Read(read => read.Action("Members_Read", "Home").Type(HttpVerbs.Get)))
.Pageable()
.Selectable()
.Sortable()
)
b)Sortable is always giving me a json result from server side.I cannot enable client sorting besides i wrote my code exactly the same
as kendo mvc examples. c)ServerOperation(false) still does not disables server side sorting.d)I ve added to web.config this line
<modules runAllManagedModulesForAllRequests="true" /> but again no client side sorting.
Any ideas on what is wrong with the above?
Thanx in advance