HI,
try like this, but change the connectionstring and query as yours.
void BindGrid()
{
string strSQLconnection = "Data Source=SERVERNAME;Initial Catalog=DBNAME;Integrated Security=True";
SqlConnection sqlConnection = new SqlConnection(strSQLconnection);
SqlCommand sqlCommand = new SqlCommand("select * from TABLE", sqlConnection);
sqlConnection.Open();
SqlDataReader reader = sqlCommand.ExecuteReader();
GridView1.DataSource = reader;
GridView1.DataBind();
}