actually I have bounded a dropdownlist in gridview in edit mode, but the problem is that whenever i try to select another value from dropdownlist, it auto select the first value.
I also used !IsPostBack property on page_load event but still it is not selecting the another items.
 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
    if (e.Row.RowType == DataControlRowType.DataRow)
    {
        if ((e.Row.RowState & DataControlRowState.Edit) > 0)
        {
            DropDownList ddlCost_Code = DropDownList)e.Row.FindControl("ddlCost_Code");
            BAL bl = new BAL();
            DataTable dt_for_CostCode = null;
            dt_for_CostCode = bl.Select_Cost_Code();
            if (dt_for_CostCode.Rows.Count > 0)
            {
                ddlCost_Code.DataSource = dt_for_CostCode;
                ddlCost_Code.DataTextField = "Cost_Code";
                ddlCost_Code.DataValueField = "Proposalno";
                ddlCost_Code.DataBind();
            }
}
  if (!IsPostBack)
    {
        try
        {
            Log_Booked_Info_Through_Booking_Table();
        }
        catch (Exception ex)
        {
            WebMsgBox.Show(ex.Message);
        }
    }
}
 
                        
Try this: