Click here to Skip to main content
15,885,767 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: ASP.NET Pin
Sandeep Mewara4-Mar-13 23:02
mveSandeep Mewara4-Mar-13 23:02 
GeneralRe: ASP.NET Pin
Varadha Raj5-Mar-13 0:02
Varadha Raj5-Mar-13 0:02 
AnswerRe: ASP.NET Windows Application Pin
Muhammad Aqib Shehzad5-Mar-13 0:55
professionalMuhammad Aqib Shehzad5-Mar-13 0:55 
GeneralRe: ASP.NET Windows Application Pin
Varadha Raj5-Mar-13 1:17
Varadha Raj5-Mar-13 1:17 
AnswerRe: ASP.NET Pin
Howard Richards5-Mar-13 3:21
Howard Richards5-Mar-13 3:21 
QuestionDataset Pin
berba4-Mar-13 1:00
berba4-Mar-13 1:00 
AnswerRe: Dataset Pin
Blikkies4-Mar-13 3:05
professionalBlikkies4-Mar-13 3:05 
Questiondropdownlist auto select first value in gridview with edit mode Pin
demoninside93-Mar-13 20:30
demoninside93-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 Pin
Karthik Harve3-Mar-13 21:44
professionalKarthik Harve3-Mar-13 21:44 
GeneralRe: dropdownlist auto select first value in gridview with edit mode Pin
demoninside93-Mar-13 21:56
demoninside93-Mar-13 21:56 
GeneralRe: dropdownlist auto select first value in gridview with edit mode Pin
Karthik Harve3-Mar-13 22:00
professionalKarthik Harve3-Mar-13 22:00 
GeneralRe: dropdownlist auto select first value in gridview with edit mode Pin
demoninside93-Mar-13 22:13
demoninside93-Mar-13 22:13 
GeneralRe: dropdownlist auto select first value in gridview with edit mode Pin
Karthik Harve3-Mar-13 22:23
professionalKarthik Harve3-Mar-13 22:23 
GeneralRe: dropdownlist auto select first value in gridview with edit mode Pin
demoninside93-Mar-13 22:27
demoninside93-Mar-13 22:27 
GeneralRe: dropdownlist auto select first value in gridview with edit mode Pin
Karthik Harve3-Mar-13 23:23
professionalKarthik Harve3-Mar-13 23:23 
GeneralRe: dropdownlist auto select first value in gridview with edit mode Pin
demoninside93-Mar-13 23:35
demoninside93-Mar-13 23:35 
GeneralRe: dropdownlist auto select first value in gridview with edit mode Pin
Karthik Harve3-Mar-13 23:38
professionalKarthik Harve3-Mar-13 23:38 
GeneralRe: dropdownlist auto select first value in gridview with edit mode Pin
demoninside93-Mar-13 23:53
demoninside93-Mar-13 23:53 
GeneralRe: dropdownlist auto select first value in gridview with edit mode Pin
Karthik Harve3-Mar-13 23:59
professionalKarthik Harve3-Mar-13 23:59 
GeneralRe: dropdownlist auto select first value in gridview with edit mode Pin
demoninside93-Mar-13 23:57
demoninside93-Mar-13 23:57 
GeneralRe: dropdownlist auto select first value in gridview with edit mode Pin
Karthik Harve4-Mar-13 0:04
professionalKarthik 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? Pin
Madhubala Ganesan2-Mar-13 6:33
Madhubala 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? Pin
Bernhard Hiller3-Mar-13 20:35
Bernhard Hiller3-Mar-13 20:35 
QuestionJson + asp.net Pin
jojoba20112-Mar-13 4:45
jojoba20112-Mar-13 4:45 
AnswerRe: Json + asp.net Pin
jkirkerx4-Mar-13 10:36
professionaljkirkerx4-Mar-13 10:36 

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

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