Options
Options ...
Example
grid.selectCell(3, 0);
grid.updateConfig({ allowEditCells: false });Options
actions:col
allowAlignbooleanDefines if user is allowed to modify column text alignment.
falseallowDeleteColsbooleanDefines if user is allowed to delete columns.
trueallowFreezeColsbooleanproDefines if user is allowed to freeze (and unfreeze) columns. Not suitable for production yet.
falseallowHideColsbooleanDefines if user is allowed to hide columns.
trueallowInsertColsbooleanDefines if user is allowed to insert columns.
trueallowMoveColsbooleanDefines if user is allowed to move columns.
trueallowResizeColsbooleanDefines if user is allowed to resize columns.
trueclipboard
allowCopybooleanDefines if user is allowed to copy cell values.
trueallowCutbooleanDefines if user is allowed to cut cell values.
trueallowPastebooleanDefines if user is allowed to paste cell values.
trueexpandSheetOnPastebooleanDefines if document should expand when pasting a selection that exceeds document bounds.
falseactions:row
allowDeleteRowsbooleanDefines if user is allowed to delete rows.
trueallowFreezeRowsbooleanproDefines if user is allowed to freeze (and unfreeze) rows. Not suitable for production yet.
falseallowHideRowsbooleanDefines if user is allowed to hide rows.
trueallowInsertRowsbooleanDefines if user is allowed to insert rows.
trueallowMoveRowsbooleanDefines if user is allowed to move rows.
trueactions:cell
allowEditCellsbooleanDefines if user is allowed to directly edit cells. (This setting does not prevent cut, paste & fillCells actions from modifying any cell values.)
trueallowFillCellsbooleanproDefines if user is allowed to fill cells by dragging fill handle.
trueallowSortbooleanproDefines if user is allowed to sort.
truefillCellsDirectionproDefines direction(s) in which user can drag to fill cells. (Setting is ignored if allowFillCells is set to false.)
'y''x''y''xy'instance
bottomBararrayPass in theme settings to override default theme. Theme affects colors and opacities of elements inside grid view.
[
{
part: "credits"
},
{
part: "inputBar",
width: '60%'
},
{
part: "searchBar",
width: '40%'
},
{
part: "fullscreenButton"
}
];licenseKeystringproYour DataGridXL License Key
undefinedtopBararrayPass in theme settings to override default theme. Theme affects colors and opacities of elements inside grid view.
[];axes:col
colAlignDefault column content alignment. For column header label alignment, use colHeaderLabelAlign instead.
'left''left''center''right'colHeaderHeightnumberHeight of column headers in pixels.
32colHeaderLabelFunctionfunctionProvide a custom function that returns a string label for every column header. Overrides labelType, labelPrefix and labelSuffix options. HTML supported.
function colHeaderLabelFunction(colRef, labels){
if(colRef.title){
return colRef.title || '';
} else {
// return label
return `${this.options.colHeaderLabelPrefix||''}${labels?.[this.options.colHeaderLabelType]||''}${this.options.colHeaderLabelSuffix||''}`;
}
}colHeaderLabelPrefixstringA string to prepend to column header label.
''colHeaderLabelSuffixstringA string to append to column header label.
''colHeaderLabelTypeDefines label series type for untitled columns. numbers for 1,2,3; letters for A,B,C.
'letters''letters''numbers'columnSettingsobjectTakes an object of column settings
{
width: 100,
align: 'left',
headerAlign: 'left',
readOnly: false,
type: 'text',
picker: undefined,
pickerOptions: {},
formatFunction: undefined,
parseFunction: undefined,
validateFunction: undefined,
styleFunction: undefined,
sortFunction: undefined,
isToggle: false,
hideText: false
};colWidthnumberDefault column width in pixels
100frozenColsnumberproDefines amount of frozen cols (this includes any hidden columns).
0contextmenu
contextMenuItemsarrayTakes an array of context menu items.
[
"cut",
"copy",
"paste",
"align_left",
"align_center",
"align_right",
"hide_cols",
"hide_rows",
"insert_empty_cols_before",
"insert_empty_cols_after",
"delete_cols",
"insert_empty_rows_before",
"insert_empty_rows_after",
"delete_rows",
"sort_asc",
"sort_desc"
]renderer
fontSizenumbercoreFont size in pixels
10axes:row
frozenRowsnumberproDefines amount of frozen rows (this includes any hidden rows).
0rowHeaderLabelAlignLabel alignment of row headers. Applies to all.
'left''left''center''right'rowHeaderLabelFunctionfunctionProvide a custom function that returns a string label for every row header. Overrides labelType, labelPrefix and labelSuffix options.
function rowHeaderLabelFunction(rowRef, labels){
if(rowRef.title){
return rowRef.title || '';
} else {
// return label
return `${this.options.rowHeaderLabelPrefix||''}${labels?.[this.options.rowHeaderLabelType]||''}${this.options.rowHeaderLabelSuffix||''}`;
}
}rowHeaderLabelPrefixstringA string to prepend to row header label.
''rowHeaderLabelSuffixstringA string to append to row header label.
''rowHeaderLabelTypeDefines label series type for untitled columns. numbers for 1,2,3; letters for A,B,C.
'numbers''letters''numbers'rowHeaderWidthnumberWidth of row headers in pixels.
52rowHeightnumberRow height in pixels. The row height applies to every single row in the grid.
26locale
localeobjectPass in locale settings to override default locale.
{
"Copy" : null,
"Cut" : null,
"Paste" : null,
"Delete Row(s)" : null,
"Hide Row" : null,
"Hide $n Rows" : null,
"Hide Column" : null,
"Hide $n Columns" : null,
"Insert Row (up)" : null,
"Insert $n Rows (up)" : null,
"Insert Row (down)" : null,
"Insert $n Rows (down)" : null,
"Delete Column(s)" : null,
"Insert Column (left)" : null,
"Insert $n Columns (left)" : null,
"Insert Column (right)" : null,
"Insert $n Columns (right)" : null,
"$n from $total" : null,
"Deselect" : null,
"Sort A to Z" : null,
"Sort Z to A" : null
}sort
sortReachSort all or only visible rows
'all'allvisibletheme
themeThemePass in theme settings to override default theme. Theme affects colors and opacities of elements inside grid view.
import light from './../presets/themes/light.js';
light;developer
useInspectorbooleanEnables inspector for development purposes
false