Add a column to a datagrid
<p>I am trying to add a column with dropdownlist to a DataGrid</p>

<p>Here is the code for the DataGrid binding datasource</p>

<pre><code>        List&lt;CPDEmployee&gt; employeelist = (List&lt;CPDEmployee&gt;)Cache["EmployeeList"];

        unverifiedlist.DataSource = employeelist;
        unverifiedlist.DataBind();
        unverifiedlist.AllowPaging = true;
        unverifiedlist.PageSize = 10;
</code></pre>

<p>In the page.aspx code is like this</p>

<pre><code> &lt;asp:DataGrid ID="unverifiedlist" runat="server" AllowPaging="true" PageSize="10" OnPageIndexChanged="unverifiedlist_PageIndexChanged"&gt;
            &lt;Columns&gt;
                &lt;asp:BoundColumn HeaderText="Surname" DataField="Surname" ReadOnly="true"&gt;   
                &lt;/asp:BoundColumn&gt;
            &lt;/Columns&gt;
            &lt;Columns&gt;
                &lt;asp:TemplateColumn HeaderText="Options" &gt;
                    &lt;ItemTemplate&gt;
                        &lt;asp:DropDownList ID="options" runat="server"&gt;
                            &lt;asp:ListItem Value="1"&gt;Verified&lt;/asp:ListItem&gt;
                            &lt;asp:ListItem Value="0"&gt;Rejected&lt;/asp:ListItem&gt;
                        &lt;/asp:DropDownList&gt;
                    &lt;/ItemTemplate&gt;
                &lt;/asp:TemplateColumn&gt;
                &lt;asp:TemplateColumn HeaderText ="Reason"&gt;
                    &lt;ItemTemplate&gt;
                        &lt;asp:TextBox ID="reason" runat="server"&gt;&lt;/asp:TextBox&gt;
                    &lt;/ItemTemplate&gt;
                &lt;/asp:TemplateColumn&gt;
            &lt;/Columns&gt;
        &lt;/asp:DataGrid&gt;
</code></pre>

<p><img src="http://i.stack.imgur.com/oDiW8.png" alt="enter image description here"></p>

<p>The result is there are two "Surname" fields in the datagrid. The reason I added "Surname" from page side is that i can't set the order of the columns (the dropdownlist should be at last).  </p>

<p>Does anyone know how to solve this problem? thanks very much</p>
