HI ive got the following code.
- protected void AdditionalDevice_ItemCommand(object source, RepeaterCommandEventArgs e)
- {
-
- DropDownList ddlAdditionalDevicesEdit;
- try
- {
- switch (e.CommandName)
- {
- case "Edit":
-
- var label = (Label)e.Item.FindControl("lblDeviceType");
- var macadreslabel = (Label)e.Item.FindControl("lblMacAdressDevice");
- label.Visible = false;
- macadreslabel.Visible = false;
-
-
-
-
-
-
-
-
- ddlAdditionalDevicesEdit = (DropDownList)e.Item.FindControl("additionalDeviceDropDownList"); ---> this is showing only one result i need to have all of them
-
-
- ddlAdditionalDevicesEdit.Visible = true;
-
-
- var macAdressTextBox = (TextBox)e.Item.FindControl("deviceMacAdressTextBox");
- macAdressTextBox.Text = macadreslabel.Text;
- macAdressTextBox.Visible = true;
-
-
- ((Button)e.Item.FindControl("additionaldevice_editbutton")).Visible = false;
-
-
- ((Button)e.Item.FindControl("additionaldevicedeleteButton")).Visible = false;
-
-
- ((Button)e.Item.FindControl("additionaldevicesubmitbutton")).Visible = true;
-
-
- ((Button)e.Item.FindControl("additionaldeviceCancelButton")).Visible = true;
-
-
- foreach (RepeaterItem item in AdditionalDevices.Items)
- {
- if ((item.ItemType == ListItemType.Item || item.ItemType == ListItemType.AlternatingItem) &&
- (e.Item.ItemIndex != item.ItemIndex))
- {
- item.FindControl("additionaldevice_editbutton").Visible = false;
- item.FindControl("additionaldevicedeleteButton").Visible = false;
- }
- }
-
- break;
-
- case "Submit":
- break;
-
- case "Delete":
- break;
- }
-
- }
- catch (Exception ex)
- {
- App.HandleException(ex);
- ShowFailureText();
- }
- }
However the line ddlAdditionalDevicesEdit = (DropDownList)e.Item.FindControl("additionalDeviceDropDownList"); is only setting one of the two items to the dropdownlist, how can i add both of them ???