Can't open a modal from custom column button

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;

The issue is that the bootstrap objects initialize on the page loading, but the grid data is not loaded yet so grid content is not rendered and the buttons from cells are no appended to the page yet.
Unfortunately that behavior cannot be controlled or fixed from the dhtmlx side.