Skip to content

AttributesViewOptions

The AttributesViewOptions class provides various configuration options for customizing the behavior and appearance of an AttributesView.

Properties:

  • status: boolean
    Determines whether the status indicator is shown next to the value. If value is required and not supplied it will show 'red', otherwise status will show 'green'. Default is false.
  • labels: boolean
    Specifies whether field/attribute labels should be displayed or just field/attribute values. Default is true.
  • labelsWidth: string | number
    Width of the label in the form: 25/'10ch'/'25%' (ch - character width. % - percentage of the parent width).
  • readOnly: boolean
    Sets the AttributesView to read-only mode, preventing any modifications to record/attributes. Default is false.
  • gridLines: boolean
    Shows grid lines between cells in the AttributesView. Default is false.
  • hints: boolean
    Determines whether hints should be displayed. If displaying Attribute objects it will use Attribute.hint property. In the case of a Record object it will use the field hint setting (see Document Class Designer). Default is true.
  • undefinedText: string
    Specifies the text to display when a value is undefined or null.
  • labelsStyled: boolean
    Specifies whether to use layout styling only on field/attribute values or on labels too. Default is false.
  • infoPanel: boolean
    Determines whether an information panel with the field description is shown at the bottom. Default is false.
  • buttonsAlwaysVisible: boolean
    Determines whether lookup or command buttons are always visible or only when field/attribute is focused. Default is false.
  • changeOnTyping: boolean
    Determines whether change events should be fired immediately as the user types. Default is false.
  • lookupButtons: boolean | (record, field, button) => boolean
    Enables you to show/hide lookup buttons within the AttributesView cells depending on the record values. Default is false.
    Record lookup fields will automatically have lookup related buttons defined. Custom buttons can be defined in layout specifying Attribute.commands property.
    Example
    attrsView.options.lookupButtons = (rec, field, btn)=> {  
        if (btn == edit' && field == "amount")  
            return rec.someStatusField == "editable";  
    };