void datagrid_rowenter(...)
{
if (datagrid.currentrow != null)
{
//put code here
}
}