choose the selected value in a item template
<p>I have a method called BindItems() and this method gets the values to a DataTable and then a GridView is bound to it.</p>

<p>Then I have an itemtemplate in that gridview which contains a drop down, this drop down gets populated from 1 -14 from code behind under Gridview_RowDataBound, now I need to figure a way to get the Quantity value in the DataTable on the other function "BindItems()" and for each Row in the gridview so a SelectedValue = datatable["Quantity"] or something.. how can I do this?</p>

<pre><code>protected void BinItems(int myId)
{
    //this data table contains a value "Quantity"
    DataTable dt = MyClass.getItems(myId);


    uxGrid.DataSource = dt;
    uxGrid.DataBind();
}

protected void Gridview1_RowDataBound(Object sender, GridViewRowEventArgs e)
{
    if (e.Row.RowType.Equals(DataControlRowType.DataRow))
    {
        DropDownList Myddl = e.Row.FindControl("MyQuantity") as DropDownList;

        if (Myddl != null)
        {
            for (int i = 1; i &lt; 15; i++)
            {
                Myddl.Items.Add(i.ToString());
            }
        }
    }

//Some how i need to do a SelectedValue = datatable where field = Quantity for each row
}
</code></pre>
