CodeCharge Studio

UpdateAllowed Run-Time Property (ASP)

Applies to

Record Form, EditableGrid Form






object.UpdateAllowed [=value]


This property contains record update permission flag. If set to True, record update operation is permitted.

This property is set depending on the user's group permissions if the form's Restricted property is set to “Yes” during design time. If Restricted property is set to “No”, UpdateAllowed property is always True unless modified in the Before Update event.

This property may be set according to some custom permission checking scheme to enable or disable record update operation. The update button is hidden only if the value is set before form's Before Show event is called (for instance in parent component's or Before Select event). Database update operation may be cancelled if the property is set to false in Before Update event.


The following example checks if the ad that is edited belongs to the currently logged in user. If it does, the update operation is carried out. Otherwise, the update operation is not performed.
The example assumes EditAd form exists and user_id hidden field that stores the owner's identifier is inserted. This code may be inserted into Before Update event.
If EditAd.user_id.Value = CCGetUserID() Then
  EditAd.UpdateAllowed = True
  EditAd.UpdateAllowed = False
End If

See also

InsertAllowed property
DeleteAllowed property
ReadAllowed property

On-line, printable versions and updates