Binding DataRow to TextBox
Posted
by Adrian Serafin
on Stack Overflow
See other posts from Stack Overflow
or by Adrian Serafin
Published on 2010-03-16T22:52:40Z
Indexed on
2010/03/16
23:41 UTC
Read the original article
Hit count: 512
c#
|databinding
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?
© Stack Overflow or respective owner