This is a migrated thread and some comments may be shown as answers.

[Solved] Client Side grid.Filter() doesn't work with filterFunctions

0 Answers 18 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Panu
Top achievements
Rank 1
Panu asked on 04 Nov 2011, 01:00 PM
Hi,

I'm using client-side grid.Filter() calls to filter grid. They did not work in current version Q2(2011.2.712) so I downloaded hotfix mentioned in this thread: http://www.telerik.com/community/forums/aspnet-mvc/grid/client-side-grid-filter-doesn-t-work-in-current-release.aspx. Now I'm using version 2011-2-715-hotfix.

Basic filtering works just fine:
var grid = $("#ProjectList").data("tGrid");
grid.filter("FriendlyId~eq~0");


But filterfunctions do not work at all. When using filterfunctions the code never reaches controller. The POST call goes to address: http://xxx/GetProjects?ProjectList-size=20

var grid = $("#ProjectList").data("tGrid");
grid.filter("startswith(Name, 'te')");

Controller:
[GridAction(EnableCustomBinding = true)]
public ActionResult GetProjects(GridCommand command)

Grid:
@(Html.Telerik().Grid<ProjectListGridItemModel>()
      .Name("ProjectList")
      .Columns(columns =>
                   {
                       columns.Bound(o => o.FriendlyId);
columns.Bound(o => o.Name);
      })
.Pageable(paging => paging.Enabled(true).PageSize(20).Total(Total))
      .Filterable()
.EnableCustomBinding(true)
      )


I'm  using custom binding.

Is there a way to make this work?
Tags
Grid
Asked by
Panu
Top achievements
Rank 1
Share this question
or