In this scenario, the drop down list will show / hide a panel (using an ajax CollapsiblePanelExtender) when a certain value is selected. This is working well (before the replacement of the ddl with the combo box).
I have added and databound the combobox, which shows the required data values.
However, when I attempt to find the combobox, the combobox is not found. The combobox is inside the insert item template of the form view and I am using master / child pages.
Here is my server side code:
protected void FormViewSkillDetails_DataBound(object sender, EventArgs e)
{
if (FormViewSkillDetails.CurrentMode == FormViewMode.Insert)
{
FormViewSkillDetails.Focus(); //place the cursor on the 1st available field of the form view.
//DropDownList ddl = (DropDownList)FormViewSkillDetails.FindControl("DropDownListSkillTypeInsertDisplay");
RadComboBox ddl = (RadComboBox)FormViewSkillDetails.FindControl("RadComboBoxSkillTypeInsertDisplay");
Panel p = (Panel)FormViewSkillDetails.FindControl("PanelSkillOwnHeadingInsertItem");
RequiredFieldValidator rfv = (RequiredFieldValidator)FormViewSkillDetails.FindControl("RequiredFieldValidatorClientSideSkillOwnHeadingInsert");
CustomValidator cvss = (CustomValidator)FormViewSkillDetails.FindControl("CustomValidatorServerSideSkillOwnHeadingInsertItemBlank");
ddl.Attributes.Add("onchange", "JavaScript:selectInputInsertChange('" + ddl.ClientID + "', '" + p.ClientID + "', '" + rfv.ClientID + "', '" + cvss.ClientID + "');");
}
}
Any suggestions?