alignment of columns in drop down list
<p>I have used below code for showing and aligning columns in drop down list but my columns are not aligned, in the code I find max length for taking the space for first column but I do not know it does not work?</p>

<p><img src="http://i.stack.imgur.com/L5Bh9.jpg" alt="Drop Down list Alignment"></p>

<pre><code>protected void ddlProjectDocument_Load(object sender, EventArgs e)
{
    var query = from p in _DataContext.tblDocuments
                orderby p.DocumentNo
                select p;
    int maxs = 0;
    foreach (tblDocument v in query)
    {
        if (v.DocumentNo.Length &gt; maxs)
            maxs = v.DocumentNo.Length;
    }

    foreach (tblDocument vv in query)
    {
        string doctitle = vv.DocumentNo;
        for (int i = vv.DocumentNo.Length; i &lt; maxs + 2; i++)
        {
             doctitle += "&amp;nbsp;";
        }
        doctitle += "&amp;nbsp;|&amp;nbsp;";
        doctitle += vv.TITLE;
        // Use HtmlDecode to correctly show the spaces
        doctitle = HttpUtility.HtmlDecode(doctitle);
        ddlProjectDocument.Items.Add(new ListItem(doctitle, vv.DocId.ToString()));
    }
}
</code></pre>
