I am using backgridjs for one of my upcoming projects, I want to call a custom callback function on backgrid:exitEditMode
, I tried something like this below
//Sample code snippet
var Columns = new Backgrid.Columns({
name: "bookingID",
label: "ID",
cell: "string"
});
Columns.on("backgrid:exitEditMode", function () {
alert('test')
});
But the callback function fails to trigger on exiting a cell from the edit mode, am I doing something wrong? Any help would be greatly appreciated.
P.S : I am beginner in backbonejs
I finally found out a way of doing this
var grid.listenTo(collection,"backgrid:edited",function(e){alert('hi')});