I just would like to make a simple dataBinding between a textbox field and a dataGridView control..
How can I make this?

With Winforms I would add a Databinding with this
NameTextBox.DataBindings.Add("Text", ds, "Categories.Category_Product.ProductName");
But I’m trying to do this in wpf and I don’t see how to make this..
Here’s the code for the page.
public partial class Categories : Window
{
public Categories()
{
InitializeComponent();
DataTable dt = CATEGORIE_MANAGER.GetList(false);
listViewListe.ItemsSource = dt.DefaultView;
cbbParent.ItemsSource = dt.DefaultView;
}
}
How can I link the textBox with the ListViewListe? Should I use the dataContext? How can I do that?
Thanks
1 Answer