syntax question

L

Lerp

Hi,

How would I reference the 4th column in a row within a dataset that is
populating a datalist? I am trying to access this value on the
itemdatabound event of the datalist so I can perform a query based on this
value.

Thx, Lerp
 
A

Andy Gaskell

Assuming e is the DataGridItemEventArgs

DataRowView rowView = e.Item.DataItem as DataRowView;
if(rowView != null) // rowView will be null for the header/footer, etc
{
object fourthColumn = rowView.Row[3];
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,816
Messages
2,569,708
Members
45,495
Latest member
cberns21

Latest Threads

Top