This question is locked. New answers and comments are not allowed.
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()
}
);
}
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()
}
);
}