TdxSpreadSheetTableView.CanModifyDataInArea(string,TdxSpreadSheetCellsModificationMode) Method
Identifies if it is possible to change values within the specified cell range.
Declaration
function CanModifyDataInArea(const AArea: string; const AMode: TdxSpreadSheetCellsModificationMode): Boolean; overload;
Parameters
Name | Type |
---|---|
AArea | string |
AMode | TdxSpreadSheetCellsModificationMode |
Returns
Type |
---|
Boolean |
Remarks
Both overloaded function variants return True
if the target cell range contains no protected cells; otherwise, False
. Use the AMode
parameter to check if it is possible to make a specific change to cells within an array formula result area. This parameter value is ignored if the target cell range does not intersect an array formula’s result. Refer to the TdxSpreadSheetCellsModificationMode type description for details.
The first and second overloaded CanModifyDataInArea
function variants accept the target cell range and a reference (as a string in the A1 format) to the target cell range, respectively.
Note that a cell is protected if:
It belongs to a cell range that contains an array formula’s result. The EdxSpreadSheetCannotChangePartOfArrayError exception occurs if a user attempts to finish the cell edit operation by a mouse click or any keystroke except Ctrl+Shift+Enter.
Both the worksheet’s OptionsProtection.Protected property and the cell’s Style.Locked property are set to
True
.