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

[Solved] Filter drop down menus are empty

0 Answers 66 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.
Ben
Top achievements
Rank 1
Ben asked on 13 Jul 2011, 12:13 AM
Hi,
I'm binding to a ModelView and one of the Bound columns is bound to another entity (using EF4). Other columns filter fine, but this one column shows empty dropdowns instead of 'contains, 'starts with', etc...

Column 'Company Name' filters fine, but 'Customer Numbers' shows empty dropdown filters.

Any ideas?

ViewModel is created by select using following expression


public static Expression<Func<MasterContactCompany, MasterContactViewModel>> CreateMasterContactViewModelFromContactCompany()
        {
            return (o => new MasterContactViewModel
                         {
                             Id = o.MasterContact.Id,
                             CompanyName = o.Company.Name,
                             CustomerNumbers = o.Company.ContactCompanies
                                .Where(m => m.ContactID == o.ContactID && m.CompanyID == o.CompanyID)
                                .Select(m => m.CustomerNumber)
                                .Distinct()
                                .AsQueryable()
                         }
                   );
        }
Tags
Grid
Asked by
Ben
Top achievements
Rank 1
Share this question
or