I am trying to bind DataTable column to combobox, I have DataTable Names "Types" with one column, the header of this column is "Type".
I have tried the following:
private DataTable dt;
public MainWindow()
{
InitializeComponent();
dt=Query();// return datatable from the database
myComboBox.DataContext =dt;
}
but the combobox is still empty (the datatable isn't)
I have tried this answer, but in my C# wpf I have no myComboBox.ComboBox.DataSource
property