There isn't a way to automate it, no - but it's pretty easy to do. Just call the
DataGridView.ClearSelection Method (System.Windows.Forms) | Microsoft Docs[
^] once you have set the DataSource:
using (SqlConnection con = new SqlConnection(strConnect))
{
try
{
using (SqlDataAdapter da = new SqlDataAdapter("Select * from MyTable", con))
{
using (DataTable dt = new DataTable())
{
da.Fill(dt);
myDataGridView.DataSource = dt;
myDataGridView.ClearSelection();
}
}
}
catch (Exception ex)
{
Debug.WriteLine(ex.ToString());
}
}