title: How to append row from one dataset to another dataset?
body: <p>I want to add one row from dataset ds to dc every time. and I want to keep updating the Gridview to bigger the table. But when I  try it in my code. the Gridview can only display one row according to what i input in the textbox. </p>
  
  <pre><code>public partial class TestGridview : System.Web.UI.Page
  {
      int count = 0;
      DataSet dc = new DataSet();
      protected void Page_Load(object sender, EventArgs e)
      {
  
          string text = TextBox1.Text;
  
          SqlConnection con = new              SqlConnection(ConfigurationManager.ConnectionStrings["XMLConnectionString"].ConnectionString);
  
          // Create the command object
          string str = "SELECT * FROM XML WHERE [Part_Numbber] = @textInput";
  
          SqlCommand cmd = new SqlCommand(str, con);
          cmd.Parameters.AddWithValue("textInput", text);
  
          SqlDataAdapter da = new SqlDataAdapter(cmd);
  
          DataSet ds = new DataSet();
          da.Fill(ds, "XML");
  
          if (count == 0)
          { 
              dc = ds.Clone();
              count ++;
          }
  
          for (int i = 0; i &lt; ds.Tables[0].Rows.Count; i++)
          {
              if (ds.Tables[0].Rows[i].ItemArray[0].ToString() != "NULL")
              {
  
                  dc.Tables[0].ImportRow(ds.Tables[0].Rows[i]);
              }
          }
  
  
  
          GridView1.DataSource = dc;
          GridView1.DataBind();
  
      }
  }
  </code></pre>