Telerik MVC Grid filterBy not working

2019-08-19 06:14发布

1条回答
干净又极端
2楼-- · 2019-08-19 06:28

The application you have referred uses hidden fields that are updated through js on DataBound event of the grid like

$('#currentPage').val(currentPage);
            $('#orderBy').val(orderBy);
            $('#groupBy').val(groupBy);
            $('#filterBy').val(filterBy);

However, if you have a look at keys that grid posts when filtering, it looks like enter image description here
so, in that application if you are trying to access filtering info in _index method which provides data to grid ajaxically, you have to change parameter name from filterBy to filter like

public ActionResult _Index(string page, string orderBy, string filterBy, string groupBy)
查看更多
登录 后发表回答