The ItemArray

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
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
 
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();
 
Back
Top