ItemDataBound ( foo: X), . DataList, , , .
- :
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
foo.ItemDataBound += new DataListItemEventHandler(foo_ItemDataBound);
}
. DataRow, .
void foo_ItemDataBound(object sender, DataListItemEventArgs e)
{
Control fooY = (e.Item.FindControl("foo:Y") as Control);
DataRow data = e.Item.DataItem as DataRow;
fooY.SomeProperty = data["id"];
}