Hi!
First a warning...I'm a fresh newbie with LLBLGen!
I run this routine to filter and sort a table. I get an "Object not set to an instance of an object" error. My code looks like this
private void LoadMemberOfCompanies(IEntity User)
{
var CompaniesSelected = new CompanyTypedList();
// Filter expression
IPredicateExpression filter = new PredicateExpression
{
new FieldCompareSetPredicate(
User.Fields["UserId"], UserInCompanyFields.UserId, SetOperator.In, null)
};
// Sort expression
ISortExpression sorter = new SortExpression { CompanyFields.Company | SortOperator.Ascending };
// Get them all, sorted and with duplicates
CompaniesSelected.Fill(0, sorter, true, filter);
// Bind to list
listUserCompaniesSelected.DataSource = CompaniesSelected;
listUserCompaniesSelected.ValueMember = "CompanyId";
listUserCompaniesSelected.DisplayMember = "Company";
}
It works fine if I'm not having the filter when doing the Fill().
Any help would be very much welcomed!
Cheers,
Johan Fredriksson
SPESO