title: Datagridview deleting last row
body: <p>I have a program that takes an name and password entered in textboxes and saves them into a database and then shows all the entered data in a datagridview. The program has buttons for adding and deleting records in the database by selecting a row in the datagridview.</p>
  
  <p>Them problem I am having is that when I delete the last row of data in the datagridview when there is only 1 row, the data is deleted in the sqldatabase but not in the datagridview. If I close the program and run it again it shows that there is no data in the datagridview as it should. </p>
  
  <p>How can I make it so that the datagridview shows nothing upon deleting the final record?</p>