TTMSFNCDataGrid.Replace Method
Replaces text in all data cells using default find parameters.
API unit family: TMSFNCDataGrid
Declaring type: TTMSFNCDataGrid
Inherited from: TTMSFNCCustomDataGrid
Overloads
Overload 1
Replaces text in all data cells using default find parameters.
function Replace(AOriginalValue, ANewValue: string): Integer; overload;
int __fastcall Replace(System::UnicodeString AOriginalValue, System::UnicodeString ANewValue)/* overload */;
Remarks
Equivalent to the overload with an empty parameter set (case-insensitive, fixed cells excluded). Every occurrence inside a matching cell is replaced.
Parameters
| Name | Description |
|---|---|
AOriginalValue |
Text to find. |
ANewValue |
Replacement text. |
Returns
Number of cells that were modified.
Overload 2
Replaces text in the cells matched by the specified find parameters.
function Replace(AOriginalValue, ANewValue: string; AParameters: TTMSFNCDataGridDataFindParameters): Integer; overload;
int __fastcall Replace(System::UnicodeString AOriginalValue, System::UnicodeString ANewValue, TTMSFNCDataGridDataFindParameters AParameters)/* overload */;
Remarks
Cells are located with Find; within each matching cell every occurrence is replaced case-insensitively, regardless of the match-case option. The operation runs inside a single update.
Parameters
| Name | Description |
|---|---|
AOriginalValue |
Text to find. |
ANewValue |
Replacement text. |
AParameters |
Search options controlling matching and scope. The auto-goto option only moves the focus to the last match after all replacements. |
Returns
Number of cells that were modified.