private void GenerateEditForm(EUFolder folder, EUListItem listItem, string contentTypeID) { List <EUField> editableFields = SharePointManager.GetContentType(folder.SiteSetting, folder.WebUrl, folder.ListName, contentTypeID).Fields.GetEditableFields(); for (int i = EditControlsPanel.Controls.Count - 1; i > -1; i--) { if (EditControlsPanel.Controls[i].Tag is EUField) { EditControlsPanel.Controls.RemoveAt(i); } } int height = 30; EditItemControls = new List <EditItemControl>(); for (int i = 0; i < editableFields.Count; i++) { EUField field = editableFields[i]; EditItemControl editControl = GetEditItemControl(field, folder, listItem); Label fieldNameLabel = new Label(); fieldNameLabel.Text = field.DisplayName; fieldNameLabel.Location = new Point(10, height); fieldNameLabel.Tag = field; toolTip1.SetToolTip(fieldNameLabel, field.Description); EditControlsPanel.Controls.Add(fieldNameLabel); editControl.Location = new Point(200, height); editControl.Width = 400; editControl.Tag = field; toolTip1.SetToolTip(editControl, field.Description); EditControlsPanel.Controls.Add(editControl); height = height + editControl.Height + 5; EditItemControls.Add(editControl); } }