Try this:
if (GridView1.DataSource.ToString() == "" || GridView1.DataSource.ToString() == null || GridView1.DataSource.ToString() == "0")
{
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "FileRegister", "alert('Notification : User not registered.');", true);
}
--Amit