Skip to content

RecordsViewOptions

The RecordsViewOptions class provides various configuration options for customizing the behavior and appearance of a RecordsView.

Properties:

  • builtinContextMenu: boolean
    Enables or disables the context menu for the RecordsView. Default is true.
  • builtinContextMenuWithJustCommands: boolean
    Enables built-in context menu to show only items defined in contextMenu handler. Default is false.
  • multiline: boolean
    Allows multi-line display for cells in the view. Default is false.
  • multiSelect: boolean
    Enables the ability to select multiple records at once. Default is false.
  • persistMultiSelect: boolean
    Keeps the record’s selection while focusing other records. It’s disabled by default, and it means when you focus a new record, currently selected will be unselected unless you are holding Ctrl or Shift.
  • cellSelect: boolean
    Allows individual cell selection instead of row selection. Default is false.
  • cellMultiSelect: boolean
    Enables multi-selection of individual cells. Default is false.
  • readOnly: boolean
    Sets the RecordsView to read-only mode, preventing any modifications to records. Default is true.
  • delete: boolean
    Allows deleting records from the RecordsView. Deleting records from the RecordsView will call the record.delete() method and permanently delete the record. Default is true.
  • remove: boolean
    Deleting records from the RecordsView will just remove records from the records collection, but it will not call record.delete() method. Setting this to true will reset the delete property and vice versa. Default is false.
  • immediateEdit: boolean
    Enables immediate editing of cells when they are focused. By default, you need to click the cell with a mouse or use F2, F4, Space or Enter key depending on editor type. Default is false.
  • singleExpand: boolean
    Allows only one record to be expanded at a time. Default is false.
  • details: boolean
    Shows 'details' records of each record if they exist. Default is false.
  • selectCheckbox: boolean
    Displays a checkbox for selecting records. Default is false.
  • selectDelayed: boolean
    Enables delayed selection. If enabled, navigating up and down through records will not trigger the 'select' event immediately, but only after a record stays focused for a while. Default is false.
  • header: boolean
    Displays headers (column names) for the RecordsView. Default is true.
  • userAccess: boolean
    Displays records that are not 'accessed' as bold, and when they are focused longer than 2 seconds they will be marked 'accessed' and be displayed with normal text. Default is false.
    Hint: This works only for document classes with 'Access Monitoring' option enabled.
  • gridLines: boolean
    Shows grid lines between cells in the RecordsView. Default is false.
  • lookupButtons: boolean | (record, field, button) => boolean
    Enables you to show/hide lookup buttons within the RecordsView cells depending on the record values. For this to work, RecordsView property readonly must be false and cellSelect must be true. Default is false.
    Record lookup fields will automatically have lookup related buttons defined. Custom buttons can be defined using RecordsView.fields property and specifying Attribute.commands property.
    recsView.options.lookupButtons = (rec, col, btn)=> {  
        if (btn == 'search')  
            return rec.someValueField < 100;  
      else if (btn == 'edit')  
            return rec.someStatusField == 'editable';  
    };