Click here to Skip to main content
15,890,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
protected void gvMeatDispatch_RowDataBound(object sender, GridViewRowEventArgs e)
{
    try
    {
        DataTable dtpartyname = new DataTable();
        objRetailPL.status = 4;
        dtpartyname = objRetailBAL.GetType(objRetailPL);

        DropDownList ddlpn = (DropDownList)e.Row.FindControl("ddlpartyname");
        if (ddlpn != null)
        {
           // ddlpn.SelectedIndexChanged += new EventHandler(ddlbranchdate_SelectedIndexChanged);                

            ddlpn.Items.Add(new ListItem("--Select--", "0"));
            ddlpn.SelectedIndex = ddlpn.Items.Count - 1;
        }
    }
}


here ddlpn.SelectedIndexChanged event is not fired,...please help me
Posted
Updated 25-Feb-14 22:08pm
v2
Comments
george4986 26-Feb-14 5:11am    
why don't u make the code inside the dropdown selected index changed to a function and call it here?
Siva Hyderabad 26-Feb-14 5:14am    
i am using dynamic gridview and it has dropdown list control..this control must be outside dropdown list control selectedindex changed event will be fired..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900