title: Asp.net datalist RepeatDirection.Vertical shows horizontal? set repeatcolumns in code behind
body: <p>i have a datalist in my aspx like this:</p>
  
  <pre><code>&lt;asp:DataList 
       ID="dlSubs" 
       runat="server" 
       CellPadding="0" 
       CellSpacing="5" 
       RepeatDirection="Vertical"&gt;...&lt;/asp:Datalist&gt;
  </code></pre>
  
  <p>when i do this in the code-behind:</p>
  
  <pre><code>     this.dlSubs.DataSource = dtCat; // dtCat is a datatable with about 13 rows
       this.dlSubs.DataBind();
  </code></pre>
  
  <p>everything gets rendered in one column (vertical)
  but i want two colums... so i do this:</p>
  
  <pre><code> DataTable dtCat = shop.DAL.ArtikelenDB.GetLeftMenu(Convert.ToInt32(Request.QueryString.Get("catg")));
   double tmpDouble = (double)dtCat.Rows.Count / 2.0;
   double repRow = Math.Ceiling(tmpDouble);
   dlSubs.RepeatColumns = Convert.ToInt32(repRow);
   dlSubs.RepeatDirection = RepeatDirection.Vertical; // also tried without this line...
   this.dlSubs.DataSource = dtCat;
   this.dlSubs.DataBind();
  </code></pre>
  
  <p>but when i do the above. it gets rendered horizontally... how is that possible?</p>