Posted on: 10/30/2013 3:14:54 PM | Views : 662

I have a dropdown inside gridview, I am assigninig values for the dropdown inside gridview_RowDataBound event like below.
if (e.Row.RowType == DataControlRowType.DataRow) { DropDownList ddl = (DropDownList)e.Row.Cells[1].FindControl("ddlModeOfPayment"); if (ddl != null) { ddl.DataSource = clsCom.GetAbbreviation("PaymentMode"); ddl.DataBind(); ddl.Items.Insert(0, "-Select-"); } }
Now I need to set the selectedValue for that dropdown ,So I was trying the below.
<asp:DropDownList ID="ddlModeOfPayment" runat="server" AutoPostBack="false" DataTextField="Aem_Exp" DataValueField="Aem_Abr"  SelectedValue="<%#Bind( ...

Go to the complete details ...