daelmo wrote:
Mmm. It's not like that, as a collection is a container of entity objects, so normally you access related data between entities not between containers. How would you like to access the related data from collection?
ok my bad. i dont think my explanation was clear. it will be a readonly list, nothing like accessing related data between entities.
here is what i have:
IncludeFieldsList includedFields = new IncludeFieldsList();
includedFields.Add(StaffFields.FullName);
PrefetchPath path = new PrefetchPath(EntityType.GradeLevelEntity);
path.Add(GradeLevelEntity.PrefetchPathStaff, includedFields);
IPredicateExpression filter = new PredicateExpression();
filter.Add(GradeLevelFields.AcademicYearId == academicYearId);
GradeLevelCollection toReturn = new GradeLevelCollection();
toReturn.GetMulti(filter, 0, null, null, path, includedFields, 0, 0);
gradelevel collection is bound to a datagrid and has 2 columns; gradeleveldescription and fullname. somehow fullname wont show even though there is a staff assigned for every gradelevel. i was hoping the gradelevel collection would return all filtered gradelevels with the staffs fullname using the prefetch path defined.
tha name of the field is FullName and this is what i use in my columns datafield value.
DataField="FullName".
somehow it returns nothing. any ideas what might be wrong?
thanks
-shane