User Tools

Site Tools


how_to_control_the_update_buttons_of_the_browse_box_template.htm
Navigation:  How To's and Troubleshooting > How to… >====== How to Control the Update Buttons of the Browse Box template ====== Previous pageReturn to chapter overviewNext page

NewC7.jpg

Using the Application Generator, applications frequently use the Browse Box template. Another control template, the BrowseUpdateButtons control template, is used to call an appropriate update procedure from the Browse Box.

In the ABC template set, these templates use the BrowseClass to manage the state of these buttons. For example, you would only want the Insert button to be enabled if there were no records displayed in the list box.

There may be other situations where you need to manually control the state of these buttons and override the Class behavior. The solution to this is to add the following three lines of embedded code in the Init procedure of the target Browse object:

BrwX.InsertControl = 0

BrwX.ChangeControl = 0

BrwX.DeleteControl = 0

Where BrwX is the name of the browse class instance that you are trying to affect. You probably will use this to conditionally grant access to a particular update operation, like the following example:

IF User:Access <; Rights:Delete !If the user does not have delete clearance

Brw1.DeleteControl = 0 !Override class control

DISABLE(?DeleteButton)

END

how_to_control_the_update_buttons_of_the_browse_box_template.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1