Am i doing any thing wrong?

arun_mrk

Well-known member
Joined
Apr 1, 2003
Messages
51
Location
beijing
im getting a error(object not set to an instance) when i try

((DataRowView) e.Item.DataItem).Row.ItemArray[8].ToString()
or
((System.Data.Common.DbDataRecord) e.Item.DataItem)[8].ToString()

in ItemCommand event of Datagrid

but the same statement works successfully in ItemDataBound of Datagrid

Why is it so? Am i doing any thing wrong?
 
Back
Top