FormControlCollection.AddLabel(CellRange) Method
In This Article
Creates a label form control at the specified cell range.
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v24.2.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
#Declaration
LabelFormControl AddLabel(
CellRange targetRange
)
#Parameters
Name | Type | Description |
---|---|---|
target |
Cell |
The cell range where the form control should be located. |
#Returns
Type | Description |
---|---|
Label |
The label form control. |
#Remarks
#Example
The code sample below creates a label form control:
using DevExpress.Spreadsheet;
Workbook workbook = new Workbook();
workbook.LoadDocument("Document.xlsx");
var cellRange = workbook.Worksheets[0].Range["B2:C2"];
var labelFormControl = formControls.AddLabel(cellRange);
labelFormControl.PlainText = "Label";
Note
The Form
method call adds a new item to both Form
See Also