Simple Bound Control (TextBox) DB updating issue

  • Thread starter Thread starter AssOnFire
  • Start date Start date
A

AssOnFire

Hello, I have bound a textbox to a CustomerName column of my DB, using
the data binding property, and selected it from the DataTable.

when i change the text in the texbBox, i try to update the DataSource
but no luck, it seems that the datarow wasn't affected.

Hows the binding of the textBox supposed to make the change in the
data row?

if not - how to i solve this problem and make every change of the text
in the TextBox update the DataSet and then the DataSource after
submiting a

this.daFriends.Update(dsAllTable);

also tried to check when clicking the update botton if the rows show
any modification has benn done,

using :

MessageBox.Show(this.dsAllTable.FriendsList.Rows[0].RowState.ToString());

but it shows "Unchanged".

?????

Wiil aprritate any help, 10x.
 
What I have done is check the textbox's Modified property during its
Validating event to see if it has changed and then set the appropriate
DataTable.Rows[RowNumber]["ColumnName"] to the textbox value. When you
update the DataTable after that, you should see the change get saved.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top