Plz try below code it's really helping to you becz i already made it in my application....
code on .aspx page
---------------------------------------------
<asp:TemplateField HeaderText="Location">
<ItemTemplate>
<asp:Label ID="lbllocation" runat="server" Text='<%#Bind("location") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:Label ID="lblloc" runat="server" Text='<%#Bind("location") %>' Visible="false"></asp:Label>
<asp:DropDownList ID="drploc" runat="server">
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateField>
----------------------------------------------
Code on .aspx.cs page
----------------------------------------------
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if ((e.Row.RowState & DataControlRowState.Edit) > 0)
{
Label lblloc = (Label)e.Row.FindControl("lblloc");
DropDownList drploc = (DropDownList)e.Row.FindControl("drploc");
DataSet ds = new DataSet();
ds = rb.Fill_Location();
if (ds.Tables[0].Rows.Count != 0)
{
drploc.DataSource = ds.Tables[0];
drploc.DataTextField = "location";
drploc.DataValueField = "location_id";
drploc.DataBind();
}
drploc.Items.FindByText(lblloc.Text).Selected = true;
}
}
}