On Events
Last updated
Last updated
SlickGrid has a nice amount of events, see the full list of , which you can use by simply hook a subscribe
to them (the subscribe
are a custom SlickGrid Event
). There are 2 options to get access to all these events (For the first 2 you will have to get access to the Grid
and the DataView
objects which are exposed in Slickgrid-Vue
):
From the list below, the number 1. is by far the easiest and preferred way
Component
Hook yourself to the Changed event of the bindable grid object.
How to use Grid/Dataview Events
The GridExtraUtils
is to bring easy access to common functionality like getting a column
from it's row
and cell
index.
The example shown below is subscribing to onClick
and ask the user to confirm a delete, then will delete it from the DataView
.
Technically, the Grid
and DataView
are created at the same time by slickgrid-vue
, so it's ok to call the dataViewObj
within some code of the gridObjChanged()
function since DataView
object will already be available at that time.
Note The example below is demonstrated with bind
with event Changed
hook on the grid
and dataview
objects. However you can also use the EventAggregator
as shown earlier. It's really up to you to choose the way you want to call these objects.
Component
Once the Grid
and DataView
are ready, see all . See below for the gridChanged(grid)
and dataviewChanged(dataview)
functions.