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

The ItemArray

P: n/a
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
Apr 3 '07 #1
Share this Question
Share on Google+
3 Replies


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

--
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

Apr 3 '07 #2

P: n/a
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 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
Apr 3 '07 #3

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

Apr 3 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.