473,473 Members | 2,232 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Edit numeric value in a textbox bound to a typed dataset

Hi

I have a textbox which is bound to a typed dataset. The type of the data is
int. Now I'd like to programmatically change the value in this textbox (i.e.
textBox1.text = "123"). For some reason this doesn't work. It works fine when
the datatype is a string but not with an int. How can I do this?

Any help would be greatly appreciated. Thanks,

Andre
Nov 17 '05 #1
2 2407
Andre,

What do you mean it doesn't work? What is the result? Is it an
exception? Does the binding not occur?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"bisoft" <bi****@discussions.microsoft.com> wrote in message
news:33**********************************@microsof t.com...
Hi

I have a textbox which is bound to a typed dataset. The type of the data
is
int. Now I'd like to programmatically change the value in this textbox
(i.e.
textBox1.text = "123"). For some reason this doesn't work. It works fine
when
the datatype is a string but not with an int. How can I do this?

Any help would be greatly appreciated. Thanks,

Andre

Nov 17 '05 #2
The string I want to assign to the textbox just doens't appear in the box.
However, as I said, it works if the type for the textbox in the typed dataset
is of string. Could it be that the textbox, once bound to the dataset and
therefore expecting an int, doesn't accept any changes like textbox.text =
"123" since that is basically a string and not the expected int?

"Nicholas Paldino [.NET/C# MVP]" wrote:
Andre,

What do you mean it doesn't work? What is the result? Is it an
exception? Does the binding not occur?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"bisoft" <bi****@discussions.microsoft.com> wrote in message
news:33**********************************@microsof t.com...
Hi

I have a textbox which is bound to a typed dataset. The type of the data
is
int. Now I'd like to programmatically change the value in this textbox
(i.e.
textBox1.text = "123"). For some reason this doesn't work. It works fine
when
the datatype is a string but not with an int. How can I do this?

Any help would be greatly appreciated. Thanks,

Andre


Nov 17 '05 #3

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

Similar topics

4
by: Aaron Ackerman | last post by:
I am using typed datasets in an N-Tier Windows app using VB.NET. I know this posting cannot be fully explained in a single post that is why I am asking for someone to point me to a real world...
2
by: WhiskyRomeo | last post by:
I have a bound textbox (bindings are set at design time) to a dataset column. Sometimes the value of this textbox must be set so that the underlying database field gets updated to null when using...
0
by: Alex | last post by:
Imports System Imports System.Data Imports System.Data.SqlClient Imports System.Web.UI Imports System.Web.UI.WebControls Imports System.Configuration Public Class Main : Inherits Page ...
4
by: John Rose | last post by:
I have one databound TextBox on a page with one button. The TextBox loads the correct SQL record data but typing a new string into the Textbox fails to change the DataSet. Any ideas? There must...
1
by: sck10 | last post by:
Hello, I am trying to change a value when a user goes into edit mode on a DetailsView control. I am trying to use the following, but can not figure out how to get to the bound field...
20
by: MLH | last post by:
120 MyString = "How many copies of each letter do you need?" 150 MyVariant = InputBox(MyString, "How Many?", "3") If MyVariant = "2" Then MsgBox "MyVariant equals the string '2'" If...
1
by: Luqman | last post by:
My textbox is bound to Typed Dataset, with a Numeric Field, I want the user should not type anything in textbox except Numeric, how can I ? The data type is : Sql Server Decimal(5,2) Currently,...
1
by: cyningeston | last post by:
OS: WinXP Pro, VB/ASP/ADO.NET I'm building a web-based supplier management application. For each supplier we are required by the FDA to track certain documents. I've managed to pull them from...
9
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the...
0
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,...
0
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...
0
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...
1
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...
0
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,...
1
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.