473,325 Members | 2,805 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Simple Bound Control (TextBox) DB updating issue

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.

Aug 12 '06 #1
1 2025
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.

AssOnFire wrote:
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.
Aug 13 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
6
by: BBM | last post by:
Hi, I'm having trouble getting control data binding to work. As I understand it, the simplest form of databinding requires three things: 1) A control (say a textbox) on a form or user...
2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
6
by: Frank | last post by:
Hopefully this is the correct group for this message. My previous post to (I assume) a non-.net group was not welcomed. I have a form with 7 text boxes that are all bound to fields of a...
7
by: Howard Minor | last post by:
Not sure why this is an issue, but apparently when you paste a string into a textbox that is bound to a dataset/datasource, it does not save into the dataset. I've tried several things including...
6
by: timbobd | last post by:
I have a Windows form that displays a database table in a DataGrid. When you click on a row, the row's values get copied to bound TextBoxes below, and when the "Save" button is clicked the database...
2
by: Matt | last post by:
I have a number of TextBox controls bound to date fields in my application, and have come across a disconcerting issue: When you are entering data into the bound field, if you enter any string that...
4
by: Tomasz Jastrzebski | last post by:
Hello Everyone, I have a GridView control bound to a plain DataTable object. AutoGenerateEditButton is set to true, Edit button gets displayed, and RowEditing event fires as expected.
0
by: Mike | last post by:
So here's the situation (.NET 2.0 btw): I have a form, and on this form is a textbox among many other databound controls. The textbox is bound to a field in a data table via the Text property. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.