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

Kendo UI Grid Filter Row

3 Answers 142 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeel
Top achievements
Rank 1
Jeel asked on 31 Mar 2016, 01:41 PM

I am having trouble with the filter row example from your demos for the kendo ui grid. My code looks similar to what you guys are showing but I get an error when I run my site. The code I am using is shown below:

 

However, when I run this I get an error saying "Cannot convert lambda expression to type "bool" because it is not a delegate type. This happens on line

columns.Bound(p => p.Name).Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")));

What am I missing?

 

@(Html.Kendo().Grid<MyViewModel>()
    .Name("MyGrid")
    .DataSource(dataSource => dataSource
        .Ajax()
        .Read(read =>
        {
            read.Action("GetResults", "MyController");
 
        })
        .PageSize(10)
        .ServerOperation(true)
        )
        .Columns(columns =>
        {
            columns.Bound(p => p.Name).Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")));
            columns.Command(command => command.Custom("Report").Click("showDetails"));
        })
        .Filterable(ftb => ftb.Mode(GridFilterMode.Row))
        .Sortable()
        .Pageable()
        .Selectable(s => s.Mode(GridSelectionMode.Single))
 
)

3 Answers, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 04 Apr 2016, 08:10 AM

Hello Jeel,

 

I am afraid that I am not able to replicate such problem. I made a project based on the provided code and it seems that it works fine. 

 

Regards,
Boyan Dimitrov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Jeel
Top achievements
Rank 1
answered on 04 Apr 2016, 05:44 PM

I figured out the problem. I was using an old version which didn't support this feature yet. But the problem I am now having is that after I filter, I cannot select a row. My custom Command button stopped working.. Any ideas? how do we select a single row after filtering..

On my grid I have

.Selectable(s => s.Mode(GridSelectionMode.Single))

 

But this isn't working. And I am also getting another error which says

Object doesn't support property or method 'delayedClick'

0
Boyan Dimitrov
Telerik team
answered on 06 Apr 2016, 11:12 AM

Hello Jeel,

Could you please check whether you are using old version of the Kendo UI scripts and this is the reason for having this error? If you face this problem after updating the scripts please try to modify the project I attached in my last response and replicate the error you are facing. In order to attach a project a support ticket should be opened since in the forum threads only images can be attached. 

Regards,
Boyan Dimitrov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Jeel
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Jeel
Top achievements
Rank 1
Share this question
or