MVC Kendo Grid Search

Viewed 361

I am trying to add a search function to this Kendo grid in the MVC view cshtml file. In my ActionResult I am returning the model that is being used to fill the Grid. The data and search box are displayed in the grid but it will not filter the Grid when I enter text into the search box. I would like to do it on the client side so I set the ServerOperation to false

View

 @(Html.Kendo().Grid(Model)
 .Name("Grid")
 .Columns(columns =>
 {
 columns.Bound(x => x.Name).Title("Name");
 })
 .DataSource(dataSource => dataSource        
                .Ajax()
                .PageSize(20)
                .ServerOperation(false)        
            )
 )

Controller

public ActionResult Index()
    {
        List<PeopleListsViewModel> result = new List<PeopleListsViewModel>();

        try
        {
            var PeopleInfo = GetPeople();
            if (PeopleInfo != null)
            {
                result = PeopleInfo ;
            }
        }
        catch (Exception e)
        {

        }
    return View(TemplateName, result);
}
0 Answers
Related