Hi, i have this code, everything work good except the search panel. I miss something?
@(Html.Kendo().Grid<
GestionLaboratorio.Models.BD_HCE.LAB_GetContenedorOpenLab_Result
>()
.Name("gridOpenLab")
.Columns(columns =>
{
columns.Bound(p => p.id).Title("ID").Width(100);
columns.Bound(p => p.nombre).Title("Descripcion");
columns.Bound(p => p.abreviatura).Title("Abreviatura").HtmlAttributes(new { style = "text-align: center;" }).HeaderHtmlAttributes(new { style = "text-align: center;" });
columns.Bound(p => p.tipoImpresion).Title("Tipo de impresion").EditorTemplateName("TipoImpresionOpenLab").ClientTemplate("#:DescTipoImpr#").HeaderHtmlAttributes(new { style = "text-align: center;" });
columns.Command(command => { command.Edit().Text(" ").CancelText(" ").UpdateText(" "); command.Destroy().Text(" "); }).Width(150).HtmlAttributes(new { style = "text-align: center;" });
})
.Editable(editable => editable.Mode(GridEditMode.InLine))
.ToolBar(t => t.Search())
.Pageable()
.Sortable()
.Scrollable()
.HtmlAttributes(new { style = "height: 500px;" })
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(8)
.Events(events => events.Error("error_handler"))
.Model(model =>
{
model.Id(f => f.id);
})
.Read(read => read.Action("Get_Contenedor_OpenLab", "OpenLab"))
.Update(update => update.Action("Update_Contenedor_OpenLab", "OpenLab"))
.Destroy(destroy => destroy.Action("Delete_Contenedor_OpenLab", "OpenLab"))
)
.Events(events => events.Save("contenedorGuardado_Save"))
.Resizable(resize => resize.Columns(true))
public
ActionResult Get_Contenedor_OpenLab([DataSourceRequest]DataSourceRequest request)
{
try
{
return
Json(bd_hce_lab.LAB_GetContenedorOpenLab().ToList().ToDataSourceResult(request));
}
catch
(Exception e)
{
return
Json(
null
);
}
}