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

Kendo MVC grid filtering

1 Answer 53 Views
Let's talk about telerik (the good and the bad)
This is a migrated thread and some comments may be shown as answers.
littleGreenDude
Top achievements
Rank 1
littleGreenDude asked on 18 Mar 2014, 07:03 PM
What is the correct syntax to set the filter so it will only display loans with a non-zero balance in the grid?

@(Html.Kendo().Grid<BorrowerLoan>()
    .Name("Loans")
    .Events(events => events.DataBound("onDataBound"))
    .DataSource(dataSource => dataSource  
        .Ajax()
        .ServerOperation(false)
        .Read(read => read.Action("LoanListAjax", controller))
        .PageSize(Constants.PageSize)
        .Filter(CurrentLoanBalance > 0)
        )

What should the ".Filter(CurrentLoanBalance > 0)" be?

1 Answer, 1 is accepted

Sort by
0
Accepted
Alexander Popov
Telerik team
answered on 21 Mar 2014, 02:30 PM
Hello Stephen,

Adding a filter is done by using the filter's add method. For example: 
.Filter(f=>f.Add(e=>e.CurrentLoanBalance).IsGreaterThan(0))


Regards,
Alexander Popov
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
Tags
Let's talk about telerik (the good and the bad)
Asked by
littleGreenDude
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or