Skip to main content
All docs
V24.1
Row

FormControlCollection Interface

A collection of form controls.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v24.1.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

public interface FormControlCollection :
    ISimpleCollection<FormControl>,
    IEnumerable<FormControl>,
    IEnumerable,
    ICollection

The following members return FormControlCollection objects:

Remarks

Access Form Controls

Use the Worksheet.FormControls property to obtain all form controls contained in a worksheet.

To obtain an individual form control, call the FormControlCollection.GetFormControlsByName or FormControlCollection.GetFormControlById method. The FormControl.Id and FormControl.Name properties return the form control’s identifier and name.

You can also obtain a form control by its index in the collection.

Create Form Controls

The table below lists available form controls and API used to create each type.

Form Control Class Method
Button ButtonFormControl FormControlCollection.AddButton
Check Box CheckBoxFormControl FormControlCollection.AddCheckBox
Combo box ComboBoxFormControl FormControlCollection.AddComboBox
Group box GroupBoxFormControl FormControlCollection.AddGroupBox
List box ListBoxFormControl FormControlCollection.AddListBox
Radio Button RadioButtonFormControl FormControlCollection.AddRadioButton
Scrollbar ScrollbarFormControl FormControlCollection.AddScrollbar
Spinner SpinnerFormControl FormControlCollection.AddSpinner

Note

The FormControlCollection.Add... method call adds a new item to both FormControlCollection and ShapeCollection.

Available Export Formats

You can export workbooks with form controls to the following formats:

  • XLSX
  • XLSM
  • XLTX
  • XLTM
  • PDF

Disable Printing

Each form control has the PrintObject property that specifies whether to print the form control. This options also affects the form control export to PDF format.

Remove Form Controls

Call the FormControlCollection.Remove or FormControlCollection.RemoveAt method to remove a form control.

The FormControlCollection.Clear() method call removes all form controls from a worksheet.

Limitations

The Form Control API subset ships with the following limitations:

See Also