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
With that configuration, I guess my question is what is your datasource object coming out as?
With an enum described as
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);
DaysOfTheWeek.Tuesday);
DaysOfTheWeek.Wednesday);
this.edit.ItemsSource = days;
So what is you data coming back as?
I am sure I am missing something here. I see you are creating a list of days and then binding the combo to that List. What is the point of having an ENUM if you are simply going to create a custom list. I was under the impression that when you bind to an ENUM the values in that enum are used. In this way you can simply add/subtract items from the ENUM.
I thought Control.ItemsSource=ENUM should simply provide the ENUM as the datasource?
What am I missing here??
Thanks