Hide new grid button at runtime

Hide new grid button at runtime

To hide the grid buttons we will use the sc_btn_display() macro, this macro shows and hides the buttons in the toolbar at run time.


1- We use this macro in the OnScriptInit event of our grid, referring to our new button as “new”:



2- We run the application and then verify that the new button is hidden

      - Before:




      - After:


    • Related Articles

    • Hide/Show "New User" field on login screen with HTML template

      In this article, we will learn how to enable the "Hide/Show" feature that is available within the "Security -> Settings" option, for the "New User" field found in the login screen that was generated with HTML template. Currently, this feature is ...
    • Hide certain fields in a Grid by means of various conditions

      When you need to hide fields through various conditions within the Grid, we can do it through a query. The first thing we are going to do is a query and we will store it inside a variable. Then we use the macro sc_lookup. After using said macro, we ...
    • Manipulate a button display dynamically

      The most interesting feature in Scriptcase, is the manipulation of the display of buttons in applications, with the macro sc_btn_display ("nomebotao", "on / off"): To see all the macro documentation click here. We can use this macro to validate ...
    • Request a new license

      Some situations require the reinstallation of Scriptcase, in these cases, the user must generate a new serial on our website to register the tool. Follow the steps below to generate a new serial:  1. Log in to the website The entire process to ...
    • Hide/Show "Retrieve Password" field on login screen with HTML template

      In this article, we will learn how to enable the "Hide/Show" feature that is available within the "Security -> Settings" option, for the "Retrieve Password" field that is found on the login screen that was generated with HTML template. Currently, ...