By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,939 Members | 1,547 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,939 IT Pros & Developers. It's quick & easy.

Drilling Down to the very Data in the FormView/DataGrid

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.