If you followed the getting started section, you now know how to edit an object's properties with
RadDataForm for NativeScript. This article will explain how to disable editing in the editors.
RadDataForm has a
isReadOnly property which allows you to disable all of its editors.
Example 1: Make all editors read only
<RadDataForm [source]="booking" row="1" [isReadOnly]="isReadOnly">
Figure 1: RadDataForm in read only mode on Android (left) and iOS (right)
Example 2: Make only a specific editor read only
<TKEntityProperty tkDataFormProperty name="price" index="4" readOnly="true"> <TKPropertyEditor tkEntityPropertyEditor type="Decimal"></TKPropertyEditor> </TKEntityProperty>
Want to see these scenarios in action?
Check our SDK Examples for Angular repository on GitHub. You will find these and many other practical examples with NativeScript UI.
Related articles you might find useful: