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

How I can use the filter in Ajax?

1 Answer 42 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Renier
Top achievements
Rank 1
Renier asked on 11 Aug 2012, 01:03 PM
How I can use the filter in Ajax??, If you use this as an error*:

Expected primaryExpression

*Sorry for English
@(Html.Kendo()
      .Grid<Partial.Model>()
      .Name("Grid")
           .Columns(columns =>
      {
          columns.Bound(p => p.Id).Hidden(true).ClientTemplate("<span id=\"Id\">#: Id #</span>");
          columns.Bound(p => p.Names);
          columns.Bound(p => p.Another);
      })
       .Sortable()
      .Filterable()
      .DataSource(dataSource => dataSource
                                          .Ajax()
                                          .Read(read => read.Action("Action", "Controller")).Filter(r=>r.Add(a=>a.Id==1)))
 
)

1 Answer, 1 is accepted

Sort by
0
Renier
Top achievements
Rank 1
answered on 11 Aug 2012, 01:19 PM

.Filter(r=>r.Add(a=>a.Id).IsEqualTo(3)


ready with it works! :D
Tags
Grid
Asked by
Renier
Top achievements
Rank 1
Answers by
Renier
Top achievements
Rank 1
Share this question
or