473,566 Members | 2,763 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(dsAllTab le);

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

using :

MessageBox.Show (this.dsAllTabl e.FriendsList.R ows[0].RowState.ToStr ing());

but it shows "Unchanged" .

?????

Wiil aprritate any help, 10x.

Aug 12 '06 #1
1 2042
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(dsAllTab le);

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

using :

MessageBox.Show (this.dsAllTabl e.FriendsList.R ows[0].RowState.ToStr ing());

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
4078
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 the code that implements managing unbound controls on forms given the superior performance of unbound controls in a client/server environment. I can...
6
1577
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 control, 2) A field or object.member to which you want to bind, 3) A "Binding" object that connects the variable to a property of the control ("Text"...
2
8377
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 submitting the form to update the database. The server doesn't have the client side value any more. It seems to me that as I begin to write the...
6
2388
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 dataset. The form also contains a datagrid also bound to the same dataset. I have a button on the form to update the data to the source.
7
1237
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 moving the BindingContext.Position but I haven't found an easy way short of handling updating the dataset manually. Anyone have any experience...
6
11263
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 is updated (as is the DataGrid row) with changed values in the TextBoxes. Here are some observations: 1) When changes are typed into a text box...
2
2651
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 cannot be converted by the system into the date/time format, the application will not allow you to leave the TextBox control, even to close the...
4
26687
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
2485
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. In this table there are multiple columns that cannot be NULL, which, are bound to other controls (but they're not really important at this time). ...
0
7666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7584
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8108
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7644
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6260
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2083
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.