KendoUI MVC网格排序,过滤 [英] KendoUI MVC Grid Sorting,Filtering

查看:110
本文介绍了KendoUI MVC网格排序,过滤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想在MVC 3.0中使用KendoUI实现Grid

但是排序和过滤不起作用。

代码of .cshtml文件是:

Hi,
I want to implement Grid using KendoUI in MVC 3.0
But the sorting and filtering does not work.
the code of .cshtml file is :

@(Html.Kendo().Grid(Model)
    .Name("Grid")
    .Sortable(sort => sort.SortMode(GridSortMode.MultipleColumn))
    .Columns(columns =>
    {
        columns.Bound(p => p.id).Groupable(false);
        columns.Bound(p => p.FacultyName);
        columns.Bound(p => p.Subject);
        columns.Bound(p => p.University);
        columns.Bound(p => p.ContactNo);
    })

        .Groupable()
        .Sortable()
        .Pageable()
          .Scrollable()
        .Filterable()
         .ColumnMenu()
         .DataSource(dataSource => dataSource
            .Ajax()
          .PageSize(4)
            .Read(read => read
            .Action("Faculty_Read", "Faculty")
             )

        )
    ) 



我的控制器的代码是:




The code of my controller is:

public ActionResult Faculty_Read([DataSourceRequest] DataSourceRequest request)
       {

           return Json(GetFaculty().ToDataSourceResult(request), JsonRequestBehavior.AllowGet);

       }





请告诉我哪里可能我错了。我也包括在内所有kendo UI库都有正确的顺序,如KendoUI文档中所建议的那样。



提前致谢!!!



Please Inform me where may be i am wrong .I have also included all the kendo UI library with proper sequence as suggested in KendoUI documentation.

Thanks in advance!!!

推荐答案



在Kendo UI中进行大量研发之后我得到了如果我们想在客户端进行排序,过滤和分页,我们必须添加.ServerOperation(false)以便像Sorting这样的所有功能在客户端进行过滤。
Hi ,
After doing lot of R&D in Kendo UI i got that if we want sorting ,filtering and paging on client side we have to add .ServerOperation(false) so that all functionality like Sorting and filtering works on client side.




在Kendo UI中进行大量研发后,如果我们想在客户端进行排序,过滤和分页,我就得到了我们必须添加.ServerOperation(false),以便排序和过滤等所有功能都在客户端工作。
Hi ,
After doing lot of R&D in Kendo UI i got that if we want sorting ,filtering and paging on client side we have to add .ServerOperation(false) so that all functionality like Sorting and filtering works on client side.


这篇关于KendoUI MVC网格排序,过滤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆