1

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

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
sri85
  • 337
  • 2
  • 19

1 Answers1

4

I finally found out a way of doing this

var grid.listenTo(collection,"backgrid:edited",function(e){alert('hi')});
sri85
  • 337
  • 2
  • 19