excludeFromReadonly

It provides the functionality of excluding controls from being affected by the readOnlyMode.

In our doc for readOnlyMode, we have seen how we can use it to disable all app controls or some of them. For that we will always have to make a call to readOnlyMode function, if we want anything to change. excludeFromReadonly function provides the functionality of excluding controls from being affected by the readOnlyMode. For example, we can set this function in appStart event then it will effect all readOnlyMode function calls after that. It means if we have set some controls to be excluded for readONly Mode function at app start, they will always be excluded from it influence during app life time and we do not have to make calls to this function again and again. If user wants to update excludeFromReadonly controls list then a new call to excludeFromReadonly will overwrite the previous setting.

Exaample

   brixxApi.excludeFromReadonly(["myFirstControl", "mySecondControl"]);

Parameters

  1. Control array - It is a json array of control ids.

Example Usages

As we have seen in ReadOnlyMode the example of address app and how we disabled every control using it without options. Now let say we want "Address Number" and "Name" controls to stay enabled. For this purpose, we will need to add these controls to our excludeFromReadOnly function and put this code in appStart event.

   brixxApi.excludeFromReadonly(["adrNumber", "adrName"]);

As we can see in snapshot below Address number and name controls are editable after the app is started. We can use this functionality with any number of apps.

Last updated