The ItemArray

G

Guest

hey all,
I'm trying to get to an Item of a DataRow.ItemArray.
I can specify the index value and retrieve the item i need but it says you
can get to the item using the ColumnName (string) as well. When I try to
specify the column string it doesn't retrieve it.

Could it be because my GridView is bound to a stored procedure? The store
procedure is returning a table.

thanks,
rodchar
 
G

Guest

The ItemArray property of a DataRow is of type object array, doesn't expose a
Column name. You might be thinking of something else.
Peter
 
G

Guest

I'm sorry I meant the DataRow object.

Peter Bromberg said:
The ItemArray property of a DataRow is of type object array, doesn't expose a
Column name. You might be thinking of something else.
Peter
 
J

James Irvine

rodchar said:
hey all,
I'm trying to get to an Item of a DataRow.ItemArray.
I can specify the index value and retrieve the item i need but it says you
can get to the item using the ColumnName (string) as well. When I try to
specify the column string it doesn't retrieve it.

Could it be because my GridView is bound to a stored procedure? The store
procedure is returning a table.

thanks,
rodchar

foreach (DataRow r in dtCompare.Rows)
{
string searchNutrNo = r["nutr_no"].ToString();
 

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

Top