ColumnPicker

Displays a column picker (to show/hide columns) in the header context menu. Columns can be displayed in sub menus by region or tag. Grouped headers are displayed as menu hierarchies.

Column picker
//<code-header>
fiddle.title = 'Column picker';
//</code-header>
targetElement.innerHTML = '<p>Right click on a column header to show ColumnPicker</p>';
const grid = new Grid({
    appendTo : targetElement,

    // makes grid as high as it needs to be to fit rows
    autoHeight : true,

    features : {
        // this feature is enabled by default,
        // so no need for this unless you have changed defaults
        columnPicker : true,

        // disabling other features to keep menu short
        sort  : false,
        group : false
    },

    data : DataGenerator.generateData(5),

    columns : [
        { field : 'name', text : 'Name', flex : 1 },
        { field : 'score', text : 'Score', flex : 1 },
        { type : 'rating', field : 'rating', text : 'Rating', width : 180 }
    ]
});

This feature is enabled by default.

Configs

12

Common

disabledInstancePlugin
listenersEvents

Other

createColumnsFromModel: Boolean= false

Configure this as true to have the fields from the Grid's Store's modelClass added to the menu to create new columns to display the fields.

This may be combined with the stateful ability of the grid to create a self-configuring grid.

groupByRegion: Boolean= false

Groups columns in the picker by region (each region gets its own sub menu)

groupByTag: Boolean= false

Groups columns in the picker by tag, each column may be shown under multiple tags. See tags

Misc

clientInstancePlugin
localeClassLocalizable
localizableLocalizable

Properties

15

Common

disabledInstancePlugin

Class hierarchy

isColumnPicker: Boolean= truereadonly
Identifies an object as an instance of ColumnPicker class, or subclass thereof.
isColumnPicker: Boolean= truereadonlystatic
Identifies an object as an instance of ColumnPicker class, or subclass thereof.
isEventsEvents
isInstancePluginInstancePlugin
isLocalizableLocalizable

Lifecycle

configBase

Misc

clientInstancePlugin
localeHelperLocalizable
localeManagerLocalizable

Other

Functions

28

Configuration

applyDefaultsstaticBase

Events

Lifecycle

destroystaticBase

Misc

doDisableInstancePlugin
initClassstaticBase
isOfTypeNamestaticBase
mixinstaticBase
optionalLstaticLocalizable

Other

LstaticLocalizable
onEvents
relayAllEvents
triggerEvents
unEvents

Events

5
catchAllEvents
destroyEvents
disableInstancePlugin
enableInstancePlugin

Event handlers

5
onDestroyEvents
onDisableInstancePlugin
onEnableInstancePlugin

Typedefs

1