Problem with UXComboBox [wpf]

8 replies. Last post: August 24, 2010 1:01 AM by Yiannis Alexopoulos
Tags :
  • New Discussion
  • New Question
  • New Product Feedback

I have a combo box with default properties

I try to bind to a DataTable like this in code:

Private _DataForCombo As New DataTable
With _DataForCombo.Columns
         .Add("id"GetType(Integer))
         .Add("name"GetType(String))
      End With
      _DataForCombo.AcceptChanges()
      _DataForCombo.Rows.Add(0, "My Lvo")
      _DataForCombo.Rows.Add(1, "My Lvo3")
      _DataForCombo.AcceptChanges()
End With
 UXComboBox1.DisplayMemberPath = "name"
      UXComboBox1.SelectedValuePath = "id"
      UXComboBox1.GetSelectedItem()
      UXComboBox1.ItemsSource = _DataForCombo.AsDataView
 
Now when I expand I DataRowView text instead of my descriptions, if I select it show correctly.
Do I have to use ItemTemplate?
 
Thanks
All times are GMT -5. The time now is 11:08 AM.
Previous Next