N
Nathan Sokalski
I need to access one of the columns from the current DataItem in the
ItemCommand event, which I call using EventBubbling with a DataList and
Button control. The code I tried to use to access the current DataItem is
the following:
CStr(CType(e.Item.DataItem, DataRowView)("id"))
However, after some experimenting, I found out that e.Item.DataItem is
Nothing in the ItemCommand event by using the following statement:
System.Diagnostics.Debug.WriteLine("IsNothing(e.Item.DataItem): " &
CStr(IsNothing(e.Item.DataItem)))
This statement ouput the value "True". Does anybody have any ideas as to
what might be a good way to get the column values that were used for the
current Item? Thanks.
ItemCommand event, which I call using EventBubbling with a DataList and
Button control. The code I tried to use to access the current DataItem is
the following:
CStr(CType(e.Item.DataItem, DataRowView)("id"))
However, after some experimenting, I found out that e.Item.DataItem is
Nothing in the ItemCommand event by using the following statement:
System.Diagnostics.Debug.WriteLine("IsNothing(e.Item.DataItem): " &
CStr(IsNothing(e.Item.DataItem)))
This statement ouput the value "True". Does anybody have any ideas as to
what might be a good way to get the column values that were used for the
current Item? Thanks.