title: How to create multiple gridviews dynamically?
body: <p>How to create multiple gridviews?</p>
  
  <p>My code:</p>
  
  <pre><code>GridView gv = new GridView();
  Panel PNl = new Panel();
  
  for (int i = 0; i &lt; DST.Tables.Count; i++)
  {            
      gv.ID = DST.Tables[i].TableName;
      gv.DataSource = DST.Tables[i];
      gv.DataBind();
      // form.Controls.Add(gv);     
      PNl.Controls.Add(gv);     
  }
  
  //gv.Parent.Controls.Add(form);
  
  form.Attributes["runat"] = "server";
  form.Controls.Add(PNl);
  this.Controls.Add(form);
  </code></pre>
  
  <p>However, my code is creating only one grid view.</p>