I have an issue when i tried to show more than one grid in the view.
This is my first grid that works fine.
@model IEnumerable<CampeonatoFutbol.Models.PartidoClub>
@(Html.Kendo().Grid(Model)
.Name("grid")
.Columns(columns =>
{
columns.Bound(c => c.ClubDesc).Title("EQUIPO").Width(220);
columns.Bound(c => c.PrtidoCodigo).Title("PJ").Width(60);
columns.Bound(c => c.GolesClub).Title("GC").Width(60);
columns.Bound(c => c.PuntosClub).Title("PUNTOS").Width(150);
})
.HtmlAttributes(new { style = "height: 300px;" })
.Scrollable()
.Reorderable(reorder => reorder.Columns(true))
.Pageable(pageable => pageable
.PageSizes(true))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
)
)
And this the method action of the controller that render the html of that grid.
public ActionResult Campeonato()
{
//return a list for the grid
}
and whe i tried to put another grid in the same view, the second grid doesn´t show me anything
This is the second grid that i tried to use:
@(Html.Kendo().Grid<CampeonatoFutbol.Models.PartidoClub>()
.Name("gridGoleadores")
.Columns(columns =>
{
columns.Bound(c => c.NombreJugador).Title("JUGADOR").Width(220);
columns.Bound(c => c.ClubDesc).Title("EQUIPO").Width(60);
columns.Bound(c => c.GolesJugador).Title("GOLES").Width(60);
})
.HtmlAttributes(new { style = "height: 300px;" })
.Scrollable()
.Reorderable(reorder => reorder.Columns(true))
.Pageable(pageable => pageable
.PageSizes(true))
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("GoleadoresCampeonato", "Campeonato"))
.PageSize(20)
)
)
And this is the method action that it's never called:
public ActionResult GoleadoresCampeonato([DataSourceRequest]DataSourceRequest request)
{
return Json(list.ToDataSourceResult(request) )
}
I hope someone can helpme whit this.