Docs
API
-
Config
- barHeight
-
bbar
- bbarHeight
- bbarHidden
-
buttons
- buttonsHeight
- buttonsHidden
- cellHeaderHeight
- cellHeight
- cellStylingCls
- cellTrackOver
- cellWrapper
- clicksToEdit
- cls
- columnClickData
- columnLines
-
columns
- autoWidth
- align
- autoHeight
- cellAlign
- cellTip
- cls
- columns
-
data
- disallowAfterDrop
- displayKey
- draggable
- editable
- ellipsis
- exportFn
- exportable
-
filter
- flex
- format
- headerCheckBox
- headerClickSort
- headerCls
- headerCellTip
- headerLImageCls
- hidden
- id
- index
- itemCheckBox
-
items
- leftTpl
- leftWidth
- listItemTpl
- lockable
- locked
- maxWidth
- menu
- minEditorWidth
- minListWidth
- minWidth
- multiSelect
- precision
- render
- resizable
- rightLocked
- rowdrag
- searchable
- select
- selectable
- smartIndexFn
- sortable
- sorter
- sparkConfig
- spin
- step
- subSearch
- summary
- title
- titleEditable
- type
- valueKey
- values
- vtype
- width
- controllers
- columnTrackOver
- contextmenu
-
data
- defaults
- dirtyEnabled
- draggable
- droppable
- dropZone
- dropZoneFn
- doubleHorizontalScroll
- emptyText
-
events
- activate
- beforeedit
- beforeendedit
- cellclick
- celldblclick
- cellenter
- cellleave
- change
- changepage
- changepagesize
- columnclick
- columndblclick
- columndrag
- columnenter
- columnhide
- columnleave
- columnshow
- columnresize
- columntitlechange
- deactivate
- delay
- deselectrow
- dragrows
- dropitems
- endedit
- filter
- init
- insert
- headercellclick
- headercellenter
- headercellleave
- load
- lockcolumn
- remove
- rowclick
- rowdblclick
- rowenter
- rowleave
- select
- selectrow
- servererror
- set
- scope
- sort
- startedit
- unlockcolumn
- update
-
expander
- exporter
-
filter
- flexScrollSensitive
-
footer
-
gridToGrid
-
grouping
- height
- id
- infinite
- i18n
-
lang
- autoSizeColumn
- autoSizeColumns
- cancel
- columns
-
date
- decimalSeparator
- dragText
- loadingText
- lock
- no
- paging
- loadMask
- minHeight
- minWidth
- modal
- multiSort
- multiSortLimit
- nativeScroller
- paging
- renderOuter
- renderTo
- resizable
- rowEdit
- rowLines
- searching
- selModel
- shadow
- singleExpand
- state
- startEditByTyping
- stateful
- stateId
- striped
- subTBar
- allowToggle
- action
- cls
- data
- disabled
- displayKey
- editable
- emptyText
- enableToggle
- events
- format
- handler
- hidden
- id
- imageCls
- inputHeight
- itemCheckBox
- leftTpl
- leftWidth
- max
- menu
- minListWidth
- multiSelect
- multiToggle
- paramsMenu
- paramsText
- pressed
- spin
- step
- subSearch
- text
- tip
- toggleGroup
- type
- valueKey
- vtype
- width
- subTBarHeight
- subTBarHidden
- subHeaderFilter
- subTitle
- summary
- tabScrollStep
- tbar
- action
- allowToggle
- cls
- data
- disabled
- displayKey
- editable
- emptyText
- enableToggle
- events
- format
- handler
- hidden
- id
- imageCls
- inputHeight
- itemCheckBox
- leftTpl
- leftWidth
- max
- menu
- min
- minListWidth
- multiSelect
- multiToggle
- paramsMenu
- paramsText
- pressed
- spin
- step
- subSearch
- text
- tip
- toggleGroup
- type
- valueKey
- vtype
- width
- tbarHeight
- tbarHidden
- textSelection
- theme
- title
- Columns
- Events
- activate
- beforeedit
- beforeendedit
- cellclick
- celldblclick
- cellenter
- cellleave
- change
- changepage
- changepagesize
- columnclick
- columndblclick
- columndrag
- columnenter
- columnhide
- columnleave
- columnshow
- columnresize
- columntitlechange
- contextmenu
- deactivate
- deselectrow
- dragrows
- dropitems
- endedit
- filter
- init
- insert
- headercellclick
- headercellenter
- headercellleave
- load
- lockcolumn
- remove
- rowclick
- rowdblclick
- rowenter
- rowleave
- select
- selectrow
- servererror
- set
- sort
- startedit
- statechange
- unlockcolumn
- update
- Methods
- add
- addChild
- addColumn
- addEvent
- addFilter
- addGroup
- autoSizeColumns
- clearData
- clearDirty
- clearFilter
- clearGroup
- clearSelection
- collapse
- collapseAll
- collapseGroup
- copy
- deSelectRow
- destroy
- disableSelection
- each
- editCell
- enableSelection
- expand
- expandAll
- expandGroup
- exportToCSV
- exportToExcel
- find
- findItem
- fire
- firstPage
- flashCell
- flashRow
- get
- getById
- getCell
- getChanges
- getColumn
- getColumnById
- getColumns
- getData
- getDataAsCSV
- getDataFiltered
- getDataView
- getFilter
- getHeaderCell
- getHeight
- getPage
- getPages
- getPageSize
- getRowById
- getSelection
- getSorter
- getSubTitle
- getTitle
- getTotal
- getViewTotal
- getWidth
- hide
- hideBar
- hideColumn
- hideLoadMask
- isDirty
- isLoading
- insert
- lastPage
- load
- lockColumn
- nextPage
- on
- once
- prevPage
- redo
- remove
- removeAll
- removeAt
- removeColumn
- removeRow
- removeRowById
- rightLockColumn
- save
- scroll
- scrollToRow
- search
- selectCell
- selectCellDown
- selectCellLeft
- selectCellRight
- selectCellUp
- selectColumn
- selectRow
- set
- setById
- setColumnComboData
- setColumns
- setColumnTitle
- setColumnWidth
- setData
- setHeight
- setPage
- setPageSize
- setParams
- setSelModel
- setSubTitle
- setTitle
- setTrackOver
- setUrl
- setWidth
- show
- showAt
- showBar
- showColumn
- showLoadMask
- sort
- stopEditor
- stopSelection
- toggleCollapse
- toggleExpand
- un
- undo
- undoAll
- unLockColumn
- update
- updateFilters
addEvent(eventName: String)
For adding custom event it is used 3 methods:
addEvent
,fire
,on
.
MethodaddEvent
adds custom event to grid.Example
events: [{ init: function(grid) { grid.addEvent('custom-event'); grid.on('custom-event', function() { console.log(arguments); }); setTimeout(() => { grid.fire('custom-event', { text: 'Good morning' }); }, 3000); } }], tbar: [{ type: 'button', text: 'Click', handler: function() { grid.fire('custom-event', { text: 'Good evening' }); } }],
Samples
See also