You can do it in code behind by using OnItemDataBound Event of datagrid.
The data is bounded to the datagrid upon firing this event.So, get the column 2 value as
<pre lang="c#">
protected void OnItemDataBound(object sender,DataGridItemEventArgs e)
if(e.Item.Cells[1].Text==1)
{
}