here I'm using SQL Database.. so make the connection as per this..
string query="select * from table_name where UserID='"+userID+"'";
SqlDataAdapter da=new SqlDataAdapter(query, here your connection object or connection string);
DataTable dt=new DataTable();
da.Fill(dt);
DataGridView1.DataSource=dt;
DataGridView1.DataBind();