Use the below:
public void loadproduct3()
{
SqlConnection conn = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]);
conn.ConnectionString = "Data Source=USER-PC;Initial Catalog=BARDB;User ID=sa;Password=mike";
SqlDataAdapter oSDA = new SqlDataAdapter("select * from tblproduct", conn);
DataSet oDs = new DataSet();
oSDA.SelectCommand.CommandType = CommandType.Text;
oSDA.Fill(oDs);
if (oDs.Tables[0].Rows.Count > 0)
{
dgvSales.DataSource = oDs;
dgvSales.DataBind();
}
}