473,322 Members | 1,526 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,322 software developers and data experts.

Drilling Down to the very Data in the FormView/DataGrid

Hey everyone,

I know we have to be able to do this, or Microsoft was stupid. How do
we get down to the very variables in the DataGrid and FormView? Lets
say I have a table to hold a product ID and the product name...

-----------------------
| ID: | Name: |
| 1 | MyProduct1 |
| 2 | MyProduct2 |
| 3 | MyProduct3 |
| 4 | MyProduct4 |
-----------------------

This is from a SQL database where "ID" is from the variable
"product_id" and "Name" is from the variable "product_name". How would
I call a function (sort of like "SELECT") where when i clicked on the
button it would be able to give me the value of the variable
"product_id" of the row I clicked. In other words, if I clicked on the
button that was next to the product called "MyProduct1" the function
would return "1" because the variable "product_id" in that row is equal
to 1.

Does anyone know how to do that in VB.NET and ASP.NET 2.0?

Nov 19 '05 #1
4 1266
I attempted to respond to your inquiry but my example wouldn't post (.NET errors!). Send me your email at jd*******@comcast.net and I can respond to directly.

Jay Dinsbac

From http://www.developmentnow.com/g/8_20...iewDataGrid.ht

Posted via DevelopmentNow.com Group
http://www.developmentnow.com
Nov 19 '05 #2
On Mon, 27 Jun 2005 08:06:24 -0700, Kivak wrote:
Hey everyone,

I know we have to be able to do this, or Microsoft was stupid. How do
we get down to the very variables in the DataGrid and FormView? Lets
say I have a table to hold a product ID and the product name...

-----------------------
| ID: | Name: |
| 1 | MyProduct1 |
| 2 | MyProduct2 |
| 3 | MyProduct3 |
| 4 | MyProduct4 |
-----------------------

This is from a SQL database where "ID" is from the variable
"product_id" and "Name" is from the variable "product_name". How would
I call a function (sort of like "SELECT") where when i clicked on the
button it would be able to give me the value of the variable
"product_id" of the row I clicked. In other words, if I clicked on the
button that was next to the product called "MyProduct1" the function
would return "1" because the variable "product_id" in that row is equal
to 1.

Does anyone know how to do that in VB.NET and ASP.NET 2.0?

First, no different in 1.1 than 2.0.
It is all about Object Oriented Programming(plus the additional difficulty
of sending the info to the web).
Imagin each cell in the grid to be an element in an array of rows.
Whatever you put in the cells is an object with some representation in the
DOM (Document Object Model) at the server (there is also a DOM at the
client (but this you access at the client in Javascript).

Nov 19 '05 #3
Can you show me the code for it?

BTW Jay, your E-mail didn't send, send it to me
"li**********@gmail.com"

Nov 19 '05 #4
weird, it does not show it. here:

l i t t l e w o l f e e @ g m a i l . c o m

TY =)

Nov 19 '05 #5

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

Similar topics

2
by: John M | last post by:
Hi, I have a form which I would like to keep in 'FormView', but which displays rows each containing records. Generally the data will be added/updated by moving between fields, but I would also...
0
by: Stuart Ferguson | last post by:
I am currently experimenting with the FormView control using an ObjectDataSource, i have got the select section of the form view control working fine however when it comes to using the formview to...
1
by: SomebodyElse | last post by:
Hi. Apologies if this has been asked here before - I've searched & searched but can't find anything. It's probably my serach parameters, but I'm having trouble even describing it to a search...
0
by: MRW | last post by:
Hello! I'm trying to make a FormView (using VB.NET) so when a person adds a new record, one of the fields is automatically filled in with a cookie value. Right now the code is: <asp:TextBox...
0
by: sanjeev06 | last post by:
When Updating using a FormView and ObjectDataSource, the formview always does the data-binding of its controls and the field values in the FormView are always overwritten by the results of the...
1
by: TheDude5B | last post by:
Hi, I have created the Insert Template for my FormView on an aspx page using asp.net 2.0. Inside this FormView I have some TextBox's and other elements. One of these elements is a DropDownList...
5
by: =?Utf-8?B?QWRhciBXZXNsZXk=?= | last post by:
Hi All, I have a GridView inside the EditItemTemplate of a FormView. Both FormView and GridView are data bound using an ObjectDataSource. When the FormView's ObjectDataSource object has a...
0
by: =?Utf-8?B?RQ==?= | last post by:
The issue is that I have two formviews in a multiview. The second formview's objectdatasource references controls in the first formview. If the query to populate the first formview results in...
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...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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

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.