XamComboBoxField in XamDataGrid is Empty

200 Views Asked by At

Please help there is no data in the drop down in the combobox field in the xamdatagrid this only thing it show that it is a collection enter image description here

I have this class

 public class AvisTIlGrid {
        public int BureaoOrdreNr { get; set; }
        public decimal Total { get; set; }
        public int UgeavisID { get; set; }
        public string bureauOrdreNr { get; set; }

        public List<Fejl> fejl { get; set; }

}
public  class Fejl
    {
        private string fejltekst;

        public string FejlTekst { get => fejltekst; set => fejltekst = value; }
    }

And in a Dao Class the fejl is populated with data from the FejlTekstTable

fejl = diMPdot.tblFejlTeksts.Select( f => new Fejl()
                                               {
                                                   FejlTekst = f.FejlTekst
                                               }).ToList()

The result from the query looks like this its a List Ingen valgt Bestilt for sent - ikke bragt Ordre ikke modtaget Glemt annonce DLU har fremsendt forkert matr. Vi har indrykket forkert matr. Forkert farve Forkert placering Forkert annonce format Glemt farve

And in my view class I have a XamDataGrid where Specify a ComboBoxField but when I run the code there is no data in the dropdown memu

      <igWPF:ComboBoxField  Name="fejl" DisplayMemberPath="FejlTekst" Label="Fejl" >
                    </igWPF:ComboBoxField>
1

There are 1 best solutions below

0
Thokle On
 <igWPF:ComboBoxField Name="fejl" Label="Fejl" DisplayMemberPath="FejlTekst" ValuePath="FejlTekst" BindingType="Unbound" Visibility="Collapsed">
                    <igWPF:ComboBoxField.Settings>
                        <igWPF:FieldSettings>
                            <igWPF:FieldSettings.EditorStyle>
                                <Style TargetType="{x:Type igWPF:XamComboEditor}">
                                    <Setter Property="ItemsSource" Value="{Binding DataItem.fejl}"/>
                                </Style>
                            </igWPF:FieldSettings.EditorStyle>
                        </igWPF:FieldSettings>
                    </igWPF:ComboBoxField.Settings>
                    </igWPF:ComboBoxField>