Databinding with a GridView

Here’s how to call a codebehind function for the rows of a GridView. No rocket science, but useful for reference…

ASPX:
< %# GetStatusImage(Container) %>

Code behind:
protected string GetStatusImage(IDataItemContainer row)
{
}

or

ASPX:
< %# GetStatusImage(Container as GridViewRow) %>

Code behind:
protected string GetStatusImage(GridViewRow row{
}

/Emil