Binding DataRow to TextBox
- by Adrian Serafin
Hi!
I want to bind textbox to single DataRow object (passed to dialog form for editing). Here is my code:
DataRow row = myDataTable.NewRow();
EditForm form = new EditForm(row);
//in EditForm constructor
nameTextBox.DataBindings.Add("Text", row, "name");
and I'm gettinh an error: Cannot bind to property or column in DataSource. Do you know what I'm missing or any workarounds maybe?