Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
571
Enums in XAMWebCombo Editor
posted

Hi 

I am trying to load an Enum into the XamWebComboEditor but the items are not showing up.

I have an the following Enum Declared

Public Enum eDaysOfTheWeek

    [Unknown]

    [Monday]

    [Tuesday]

    [Wednesday]

    [Thursday]

    [Friday]

    [Saturday]

    [Sunday]

End Enum

 

In my XAML file the following Resource is declared:

 <elliptx:eDaysOfTheWeek x:Key="DaysOfWeek" d:IsDataSource="True"/>

 

My comboeditor is set up as follows:

    <igCombo:XamWebComboEditor x:Name="xamwebcomboeditor_meetingday" 

 

                                                                   ItemsSource="{Binding Source={StaticResource DaysOfWeek}}"

                                                                   IsEditable="False" 

                                                                   Height="26"/>

 

What am i missing here??

Regards

Andrew

 

 

 

Parents
  • 21382
    posted

    With that configuration, I guess my question is what is your datasource object coming out as?

    With an enum described as

     

     

     

     

    public enum DaysOfTheWeek{

    Monday,

    Tuesday,

    Wednesday

    }

    and a combo editor set up as

    <

     

     

    ig:XamComboEditor x:Name="edit" IsEditable="false" Width="200" Height="30"></ig:XamComboEditor>

    I was able to see the enum values setting up the data

     

     

    List<DaysOfTheWeek> days = new List<DaysOfTheWeek>();

    days.Add(

     

    DaysOfTheWeek.Monday);

    days.Add(

     

    DaysOfTheWeek.Tuesday);

    days.Add(

     

    DaysOfTheWeek.Wednesday);

     

     

    this.edit.ItemsSource = days;

    So what is you data coming back as?

Reply Children