views:

15

answers:

1

Is it possible to binding a number to a datacolumn which has no number in it. For example I store the priority in the database as 1, 2, 3 and in the datagrid I want this represented as Love, Medium, High. How can I bind this to the datacolumn, and match it to the correct one?

<dg:DataGridComboBoxColumn Header="Priority" SelectedItemBinding="{Binding priority}" Width="SizeToCells" MinWidth="60" CanUserSort="True">
   <dg:DataGridComboBoxColumn.ItemsSource>
      <col:ArrayList>
         <s:String>Low</s:String>
         <s:String>Medium</s:String>
         <s:String>High</s:String>
       </col:ArrayList>
   </dg:DataGridComboBoxColumn.ItemsSource>
</dg:DataGridComboBoxColumn>
A: 

Yes you bind the number, but use a converter to convert from int to Enum value

Ragunathan