View Full Version : Event is not firing if we make grid stateful

1 Nov 2013, 3:47 AM

I have made one grid as stateful and we are saving its state in database(in database we are storing json of grid's state). Grid has 'checkchange' event in one of its column. While loading the grid from database(saved grid's state) "checkchange" event is not getting triggered it gives me "TypeError: listener.fireFn is undefined".

Code snippet :

Checkchange listener in grid's column definition :

xtype: 'favouriteCheckColumn',
id: 'chkfavouriteProject',
header: '<span id="spnProjectFavourite"></span>',
align: 'center',
dataIndex: 'IsTracked',
draggable: false,
sortable: false,
locked: false,
width: 40,
hideable: false,
listeners: {
checkchange: updateTrackStatus

Json which we are storing in database looks like below

{"gridColumns":[{"xtype":"favouriteCheckColumn","text":"<span id=\"spnProjectFavourite\"></span>","dataIndex":"IsTracked","hideable":false,"draggable":false,"sortable":false,"hideMode":"display","hidden":false,"width":40,"align":"center","tdCls":"x-grid-cell-checkcolumn grid-cell-trackupdate","listeners":{"checkchange":"updateTrackStatus"}},

Any help/suggestion will be appreciated.

Gary Schlosberg
4 Nov 2013, 4:43 PM
Seems like your updateTrackStatus function would just be a string after restoration.

26 Nov 2013, 1:16 AM

Thanks for the reply. Could you please let me know how can I treat that string as function. I tried with eval but didn't work.

Any suggestion/help would be appreciated.