Hi, i have a class Auswahl with some plain properties and a property RefFilters of type
List<RefAuswahlFilter>
What i want to achieve is: Display all Auswahl Properties in a datagrid with all RefFilter items in ONE row. the Problem is, the count of RefFilter is different from auswahl to auswahl object. in the past i use a datatable as the collection source. there i just added the MAX reffilters count as columns.
now i want to achieve this without a datatable, with something like "dynamic" Properties or anything.
public class Auswahl
{
public Auswahl()
{
this.RefFilters = new List<RefAuswahlFilter>();
}
public virtual string Beschreibung {get; set; }
public virtual long Id { get; set; }
public virtual string Programm { get; set; }
public virtual string Returnkey { get; set; }
public virtual string Variante { get; set; }
//RefFilters contains a Rank and a Filter Property
public virtual IList<RefAuswahlFilter> RefFilters { get; set; }
public class AuswahlVM
{
...
public ObservableCollection<Auswahl> Auswahlliste { get; private set; }
public void FillList()
{
try
{
var l = session.CreateCriteria(typeof(Auswahl)).List<Auswahl>().Where(x =>!String.IsNullOrEmpty(x.Returnkey));
this.Auswahlliste = new ObservableCollection<Auswahl>(l);
}
catch (Exception ex)
{
}
}