syntax question

  • Thread starter Thread starter Lerp
  • Start date Start date
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
 
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];
}
 
Back
Top