Getting Data from a Row

J

Joe Reiss

Hi All,

Using VS2005, C#

I'm sure this has been asked a million times. How does one get data from a
selected row in a gridview. The following only seems to get me the datakey
data:

myView.SelectedRow.Cells[x].Text;

I want the actual data in the cell. This would seem tobe a trivial matter -
you'd think.

Thanks,
Joe
 
J

Joe Reiss

OK, got my answer,

first get a reference to the row:

GridViewRow r = MyView.SelectedRow;
r.Cells[x].Text;
 
E

Eliyahu Goldin

????????

It shouldn't make any difference.

Can you offer any explaination?

Eliyahu

Joe Reiss said:
OK, got my answer,

first get a reference to the row:

GridViewRow r = MyView.SelectedRow;
r.Cells[x].Text;


Joe Reiss said:
Hi All,

Using VS2005, C#

I'm sure this has been asked a million times. How does one get data from
a selected row in a gridview. The following only seems to get me the
datakey data:

myView.SelectedRow.Cells[x].Text;

I want the actual data in the cell. This would seem tobe a trivial
matter - you'd think.

Thanks,
Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,781
Messages
2,569,615
Members
45,294
Latest member
LandonPigo

Latest Threads

Top