I'm doing some code in Telerik with MVC, I'm trying to render a table inside an ExpansionPanel:
Render the grid outside of the ExpansionPanel
Code of ExpansionPanel:
<div class="row">
@(Html.Kendo().ExpansionPanel()
.Name("brazil")
.Title("Brazil")
.SubTitle("South America")
.Expanded(false)
.Content(RenderHello)
)
</div>
Code of RenderHello:
@functions {
void RenderHello()
{
@(
Html.Kendo().Grid<CliroSorter.Models.OrdenDetalle>()
.Name("grid12") // template expression, to be evaluated in the master context
.Columns(columns =>
{
columns.Bound(o => o.NumOrden).Title("Numero de orden").Width(100);
columns.Bound(o => o.CodProducto).Title("Producto").Width(100);
columns.Bound(o => o.Cantidad).Width(100);
columns.Bound(o => o.CodProveedor).Title("Proveedor").Width(100);
columns.Bound(o => o.NumTienda).Title("Tienda").Width(100);
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(5)
.Read(read => read.Action("ReadDetails", "N1"))
)
.Pageable()
.Sortable()
)
}
}
I need the grid to render inside the ExpansionPanel.