Skip to main content

TcxCustomDataController.Post(Boolean) Method

Posts a record to a data source.

Declaration

procedure Post(AForcePost: Boolean = False); virtual;

Parameters

Name Type
AForcePost Boolean

Remarks

You should use this method if you need to post changes to the record after calling Insert, Append or Edit. If you do not want to post the changes, use the Cancel method instead. By default, the Post method posts only a modified record to a data source. If there are no changes made to a record being inserted or appended, calling the Post method automatically cancels inserting or appending this record to a data source. To force posting this record, set the AForcePost parameter to True.

In bound mode, implemented by the TcxDBDataController class, Post calls the Post method of the underlying dataset.

In unbound and provider modes, you should use Post to post your modified record after calling Insert, Append or Edit. However, in these modes, you can change records directly via the Values property, without activating edit mode. In this case, use the PostEditingData method.

When the end-user starts modifying a data record in ExpressQuantumGrid or ExpressQuantumTreelist, for example, edit mode is automatically activated. In edit mode, users can freely change field values and subsequently restore old values by pressing the Esc key. However, when a different record is focused, the data controller’s Post method is called implicitly.

Note

Do not call the Post method within the BeginUpdate/EndUpdate and BeginFullUpdate/EndFullUpdate blocks.

See Also