Using Entity data model in a Windows Forms Project, I want to bind simultaneously Orders entity to datagridview and to textBox, and textBox has to display OrderID value depending on the current line in the datagrid.
The code I used in Form load event is next:
using(NorthwindEntities context = new NorthwindEntities())
{
ordersDataGridView.DataSource = context.Orders;
OrderNumberTextBox. ...
}
For this case, what is the right syntax to bind Textbox ? Thank you.