If you need to customize a column type with specific HTML content, it can be easily achieved.
For instance, the code below demonstrates how to create an eXcell that displays the cell value as a button with a label:
function eXcell_customButton(cell){ //defining the eXcell name
if (cell){
this.cell = cell;
this.grid = this.cell.parentNode.grid;
}
this.edit = function(){}
this.isDisabled = function(){ return true; }
this.setValue=function(val){
this.setCValue("<input type='button' value='"+val+"'>",val);
}
}
eXcell_customButton.prototype = new eXcell;
To apply this custom column type in your grid, simply set the column type like this:
grid.setColTypes("customButton,...");
For more information and detailed examples, refer to the tutorial provided here: