Click here to Skip to main content
       

ASP.NET

 
GeneralRe: ASP.NET PinmvpSandeep Mewara4-Mar-13 23:02 
GeneralRe: ASP.NET PinmemberVaradha Raj5-Mar-13 0:02 
AnswerRe: ASP.NET Windows Application PinmemberMuhammad Aqib Shehzad5-Mar-13 0:55 
GeneralRe: ASP.NET Windows Application PinmemberVaradha Raj5-Mar-13 1:17 
AnswerRe: ASP.NET PinmemberHoward Richards5-Mar-13 3:21 
QuestionDataset Pinmemberberba4-Mar-13 1:00 
AnswerRe: Dataset PinmemberBlikkies4-Mar-13 3:05 
Questiondropdownlist auto select first value in gridview with edit mode Pinmemberdemoninside93-Mar-13 20:30 
Hi,
 
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.
 
<pre lang="c#">
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);
            }
      }
 
}
</pre>
AnswerRe: dropdownlist auto select first value in gridview with edit mode PinmemberKarthik Harve3-Mar-13 21:44 
GeneralRe: dropdownlist auto select first value in gridview with edit mode Pinmemberdemoninside93-Mar-13 21:56 
GeneralRe: dropdownlist auto select first value in gridview with edit mode PinmemberKarthik Harve3-Mar-13 22:00 
GeneralRe: dropdownlist auto select first value in gridview with edit mode Pinmemberdemoninside93-Mar-13 22:13 
GeneralRe: dropdownlist auto select first value in gridview with edit mode PinmemberKarthik Harve3-Mar-13 22:23 
GeneralRe: dropdownlist auto select first value in gridview with edit mode Pinmemberdemoninside93-Mar-13 22:27 
GeneralRe: dropdownlist auto select first value in gridview with edit mode PinmemberKarthik Harve3-Mar-13 23:23 
GeneralRe: dropdownlist auto select first value in gridview with edit mode Pinmemberdemoninside93-Mar-13 23:35 
GeneralRe: dropdownlist auto select first value in gridview with edit mode PinmemberKarthik Harve3-Mar-13 23:38 
GeneralRe: dropdownlist auto select first value in gridview with edit mode Pinmemberdemoninside93-Mar-13 23:53 
GeneralRe: dropdownlist auto select first value in gridview with edit mode PinmemberKarthik Harve3-Mar-13 23:59 
GeneralRe: dropdownlist auto select first value in gridview with edit mode Pinmemberdemoninside93-Mar-13 23:57 
GeneralRe: dropdownlist auto select first value in gridview with edit mode PinmemberKarthik Harve4-Mar-13 0:04 
Questionhow to make multiple entries for a book in database for multiple copies of the same book in a library? PinmemberMadhubala Ganesan2-Mar-13 6:33 
AnswerRe: how to make multiple entries for a book in database for multiple copies of the same book in a library? PinmemberBernhard Hiller3-Mar-13 20:35 
QuestionJson + asp.net Pinmemberjojoba20112-Mar-13 4:45 
AnswerRe: Json + asp.net Pinmemberjkirkerx4-Mar-13 10:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 30 Aug 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid