Hi all!
I'm having a little problem...
~
I want to fill a DropDownList... so far nothing special... problems start when the field I
want to bind to DataTextField is not on the root table but on the prefecth one
(field "Name" on table "Products").
It seems that fields from the prefetch table can't be accessed (at least directly).
Any suggestions (code following):
EntityCollection cfgBColl = new EntityCollection(new ConfigBaseEntityFactory());
ISortExpression sorter = new SortExpression();
sorter.Add(SortClauseFactory.Create(ConfigBaseFieldIndex.Pos, SortOperator.Ascending));
IPrefetchPath2 prefetchPath = new PrefetchPath2((int) EntityType.ConfigBaseEntity);
prefetchPath.Add(ConfigBaseEntity.PrefetchPathProducts);
ctx.Adapter.FetchEntityCollection(cfgBColl, null, 0, sorter, prefetchPath);
cfgBDDL.DataSource = cfgBColl;
cfgBDDL.DataTextField = "Products.Name"; //???
cfgBDDL.DataValueField = "ConfigBaseId";
cfgBDDL.DataBind();
Thanks in advance!