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

Grid Filter Fails on Complex Member

1 Answer 91 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nicholas
Top achievements
Rank 1
Nicholas asked on 07 Aug 2013, 02:45 PM
I have a grid that is filterable. It has two columns:
.Columns(columns => {
    columns.Bound(customer => customer.CustomerName).Title("Customer Name");
    columns.Bound(customer => customer.CustomerStatus.CustomerStatusName).Title("Status");
})
CustomerName filters without problems. However, when you attempt to filter on CustomerStatus.CustomerStatusName, the DataSourceRequest object posted back has the FilterDescriptor.Member = "undefined".

We do have kendo.aspnetmvc.min.js referenced. And we're using the lastest release 2013.2.716.

1 Answer, 1 is accepted

Sort by
0
Nicholas
Top achievements
Rank 1
answered on 08 Aug 2013, 01:15 PM
I got it working by declaring the column as a ForeignKey instead of using the complex Member.

.Columns(columns => {
    columns.Bound(customer => customer.CustomerName);
    columns.ForeignKey(customer => customer.CustomerStatusKey, new SelectList(customerStatusCollection,"CustomerStatusKey","CustomerStatusName"));
})
Tags
Grid
Asked by
Nicholas
Top achievements
Rank 1
Answers by
Nicholas
Top achievements
Rank 1
Share this question
or