title: Add rows in a gridview c#
body: <p>Im new in asp.net. I want to know how to add a row in a gridview programatically. I was able to do it but it just displays the latest addition.
  Here is my code: </p>
  
  <pre><code>DataTable dt = new DataTable();
  dt.Columns.Add("Question");
  dt.Columns.Add("Answer");
  
  DataRow dr = dt.NewRow();
  dr["Question"] = txtQuestion.Text;
  dr["Answer"] = txtAnswer.Text;
  dt.Rows.Add(dr);
  dt.AcceptChanges();
  
  gvQnA.DataSource = dt;
  gvQnA.DataBind();
  </code></pre>