I need to be able to open a bootstrap 3 modal from a button inside the treegrid. I made a custom column type with a button that should open up a modal but it doesn’t. When I make the button with the same html outside the grid it opens so It either has to do with dynamically generated html or the grid.
Button:
function eXcell_button(cell) { //the eXcell name is defined here
if (cell) { // the default pattern, just copy it
this.cell = cell;
this.grid = this.cell.parentNode.grid;
}
this.edit = function () { } //read-only cell doesn't have edit method
// the cell is read-only, so it's always in the disabled state
this.isDisabled = function () { return true; }
this.cell.innerHTML = '<button class="btn background" data-target="#modalConsume" data-toggle="modal"><span class="glyphicon glyphicon-edit text-info"></span></button>';
}
eXcell_button.prototype = new eXcell;