Hello,
I'm working with a datagrid control in ASP.NET. The datagrid shows a list of
products. One column shows the productnumber, one column shows the
productname, one column shows a picture of the product and the last column
shows an empty textbox with an 'OK' button.
People can enter a quantity in the empty textbox. After clicking on the 'OK'
button, the product and quantity should be added to another datagrid. The
problem is that I don't know how to read the quantity. I now do this as
follows (cells(5) is the template-column with the textbox, the 'OK' button
triggers the SelectedIndexChanged event):
Private Sub grdArtikelen_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles grdArtikelen.SelectedIndexChanged
Dim txb As TextBox
=CType(Me.grdProducts.SelectedItem.Cells(5).Contro ls(1), TextBox)
Dim dblQuantity As Double
dblQuantity = CType(txb.Text, Double)
End Sub
This code gets the right textbox, but the TEXT property is always empty. How
can I get the text that has been entered in the textbox?
Any help would be appreciated.
Greetings,
Remco 1 1227
> dblQuantity = CType(txb.Text, Double)
I guess this should be
dblQuantity = CType(txb.Value, Double)
"Remco Groot Beumer" <in**@rgbplus.nl> wrote in message news:<bo**********@news3.tilbu1.nb.home.nl>... Hello,
I'm working with a datagrid control in ASP.NET. The datagrid shows a list of products. One column shows the productnumber, one column shows the productname, one column shows a picture of the product and the last column shows an empty textbox with an 'OK' button.
People can enter a quantity in the empty textbox. After clicking on the 'OK' button, the product and quantity should be added to another datagrid. The problem is that I don't know how to read the quantity. I now do this as follows (cells(5) is the template-column with the textbox, the 'OK' button triggers the SelectedIndexChanged event):
Private Sub grdArtikelen_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles grdArtikelen.SelectedIndexChanged
Dim txb As TextBox =CType(Me.grdProducts.SelectedItem.Cells(5).Contro ls(1), TextBox)
Dim dblQuantity As Double
dblQuantity = CType(txb.Text, Double)
End Sub This code gets the right textbox, but the TEXT property is always empty. How can I get the text that has been entered in the textbox?
Any help would be appreciated.
Greetings,
Remco This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: TJ |
last post by:
Dear PHP group,
First question:
I have an input form that upon pressing a button validates the values
entered into this form. I am using the following code recall this form if
there is an...
|
by: Mikko |
last post by:
Is it possible to read "label" from form-field?
<label for="product1">bread</label>
<input id="product1" name="product1" type="text" size="3">
number comes with $_GET;
but how do I read the...
|
by: luke |
last post by:
I'm trying to use an image as a background for a text input box.
<form>
<fieldset><input type="text" name ="blah" class="cheese"></fieldset>
</form>
I'm using this code as part of my css to...
|
by: Stumped and Confused |
last post by:
Hello,
I really, really, need some help here - I've spent hours trying to find a
solution.
In a nutshell, I'm trying to have a user input a value in form's
textfield. The value should then be...
|
by: TTD |
last post by:
Hi,
I have a form (input type) which is based on a table. Let's say it has 2
fields
1: numeric keyfield
2: textfield.
When the form opens the numeric is automatically added with 1. When I...
| |
by: cbradio |
last post by:
Hi, I am having trouble developing a form in a restricted environment. My sample code is found below my message (sorry I don't have a URL). Basically, without a doctype, the form displays properly...
|
by: SkipNRun |
last post by:
I am a novice when comes to JavaScript, AJAX. I am working on a form, which will allow users to update their contact information. In order to make the form flexible, I need to use pull down list.
...
|
by: Michael Munch |
last post by:
Hi
I want to read the value of af text-field, create dynamic, in a form.
Se below a small test-site to do that (but readning fails):
I use the function Test_Read for reading the value from the...
|
by: Per Juul Larsen |
last post by:
Hi.
My Textfile looks like this
Variable 1
Variable 2
Variable 3
Variable 4
On opening the application it will read the textfile, and assign each
line of variable to at textfield in VB and...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
| |
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...
|
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...
|
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,...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |