I have a datagridview which gets filled with data returned from a linq query. If the query returns no results I want to display a messagebox. Is there a way of checking to s
//this gives rows count=1
if (dataGridView1.Rows.Count != 0 && dataGridView1.Rows != null)
//so finally I modifieded code as below and it works for me
if(dataGridView1.Rows.Count>1 && dataGridView1.Rows != null)