Having a ReadOnly Property directly on FormItem

It would be nice to have a ReadOnly Property directly on FormItem, instead to have a template with an eg. SfTextBox readonly=true

I don't understand why there is an "IsEnabled" and not a "IsReadOnly"

The purpose is the same (don't allow to fill the data by the user), but the IsEnabled maked the form aestetically ugly with the grey fields (imho)


3 Replies 1 reply marked as answer

MR Mallesh Ravi Chandran Syncfusion Team November 17, 2025 12:46 PM UTC

Currently, there is no ReadOnly property available directly on the FormItem container in DataForm. Instead, the ReadOnly property can be applied to the individual input components within the FormItem, such as TextBox, NumericTextBox, or similar controls.

  • IsEnabled - Works globally because disabling is consistent across all controls.
  • ReadOnly - Component-specific because not all controls support or interpret "read-only" the same way.

  • When using IsEnabled, as it applies a default disabled style that may look greyed out. If you prefer to keep the original look while preventing user interaction, you can override these styles using CSS. For example:
    .e-form-item-wrapper .e-input-group.e-control-wrapper.e-disabled {
        opacity: 1; /* Keep normal opacity */
        color: #000; /* Text color */
        background-color: #fff !important; /* Background color */
        pointer-events: none; /* Prevent interaction */
    }

    For a direct support read-only behavior, we recommend using the template option to render individual components (e.g., TextBox, NumericTextBox) and set their ReadOnly property.


    Marked as answer

    SR Sandro Rizzetto November 18, 2025 07:30 AM UTC

    Thanks, make sense that not all controls (eg. select list) supports readonly

    Thanks a lot for the css "trick" 





    MR Mallesh Ravi Chandran Syncfusion Team November 19, 2025 07:31 AM UTC

    Sandro Rizzetto, Thank you for the update. Please let us know if you require further assistance.


    Loader.
    Up arrow icon