This is just an example:
protected void DataList1_ItemDatabound(object sender, DataListItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Footer)
{
Literal lit;
lit = (Literal)e.Item.FindControl("litPagerLinks");
lit.Text = Pager.CreatePagerLinks(pagedData, Request.CurrentExecutionFilePath + "?a=1");
}
}
You can also access the underlying datasource row here and perform your logic.