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,
rodcharThe ItemArray property of a DataRow is of type object array, doesn't expose
a
Column name. You might be thinking of something else.
Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"rodchar" wrote:
> 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
>
I'm sorry I meant the DataRow object.
"Peter Bromberg [C# MVP]" wrote:
> The ItemArray property of a DataRow is of type object array, doesn't expos
e a
> Column name. You might be thinking of something else.
> Peter
> --
> Site: http://www.eggheadcafe.com
> UnBlog: http://petesbloggerama.blogspot.com
> Short urls & more: http://ittyurl.net
>
>
> "rodchar" wrote:
>
rodchar wrote:
> 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();
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment