This question is locked. New answers and comments are not allowed.
Hello,
I experience the problem in grouping with ajax binding.
Actions in controller:
public ActionResult PartialGrid()
{
return PartialView(new AnimalsModel().GetAnimals());
}
[GridAction]
public ActionResult _PartialGrid()
{
return PartialView("PartialGrid", new GridModel<Animal>(new AnimalsModel().GetAnimals()));
}
Partial view:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<LPRAjaxPartialTest.Models.Animal>>" %>
<%= Html.Telerik().Grid(Model)
.Name("Grid")
.DataBinding(dataBinding => dataBinding.Ajax().Select("_PartialGrid", "Home"))
.Pageable()
.Sortable()
.Filterable()
.Selectable()
.Groupable()
%>
View is called by link:
<li><%= Ajax.ActionLink("Load partial view", "PartialGrid", new AjaxOptions { OnSuccess = "updatePlaceholder", UpdateTargetId = "result" })%></li>
Grouping and paging do not work - impossible to drag column for grouping, when switch pages data are passed to client but not shown.
If set
.Groupable(groupable => groupable.Enabled(true).Groups(groups => groups.Add(g => g.Code)
Can not switch pages at all.
What I do wrong in binding?
I experience the problem in grouping with ajax binding.
Actions in controller:
public ActionResult PartialGrid()
{
return PartialView(new AnimalsModel().GetAnimals());
}
[GridAction]
public ActionResult _PartialGrid()
{
return PartialView("PartialGrid", new GridModel<Animal>(new AnimalsModel().GetAnimals()));
}
Partial view:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<LPRAjaxPartialTest.Models.Animal>>" %>
<%= Html.Telerik().Grid(Model)
.Name("Grid")
.DataBinding(dataBinding => dataBinding.Ajax().Select("_PartialGrid", "Home"))
.Pageable()
.Sortable()
.Filterable()
.Selectable()
.Groupable()
%>
View is called by link:
<li><%= Ajax.ActionLink("Load partial view", "PartialGrid", new AjaxOptions { OnSuccess = "updatePlaceholder", UpdateTargetId = "result" })%></li>
Grouping and paging do not work - impossible to drag column for grouping, when switch pages data are passed to client but not shown.
If set
.Groupable(groupable => groupable.Enabled(true).Groups(groups => groups.Add(g => g.Code)
Can not switch pages at all.
What I do wrong in binding?