Skip to main content

IcxNavigator.CanEdit Method

Returns whether editing can be performed.

Declaration

function CanEdit: Boolean;

Returns

Type
Boolean

Remarks

When navigating the target control, the navigator needs to be refreshed. This is performed by calling the IcxNavigatorOwner.NavigatorStateChanged method. The method call results in checking the validity of all button states. The number of methods is called to determine whether buttons need to be enabled or disabled for the current item.

The CanEdit function is used in combination with the IsEditing function. If both functions return True (which implies that editing is being performed), the Edit button becomes disabled while the Post and Cancel buttons are enabled. If the CanEdit function returns True but the IsEditing function returns False, the Post and Cancel buttons become disabled and the Edit button is enabled. If the CanEdit function returns False, all the three mentioned buttons are disabled.

See Also