Adding custom cell renderers in pe:sheet

蹲街弑〆低调 提交于 2019-12-02 06:39:46

I am the author of pe:sheet. If you want to customize the renderer you can do the following...

This is where it happens in the component: https://github.com/primefaces-extensions/core/blob/master/src/main/resources/META-INF/resources/primefaces-extensions/sheet/1-sheet.js#L59-L116

You can just override the default TextCellRenderer with your own.

function sheetExtender() {
   this.cfg.textCellRenderer = function (instance, td, row, col, prop, value, cellProperties) {
        Handsontable.renderers.HtmlRenderer.apply(this, arguments);

        // call your custom renderer method here
        myCustomerRenderer(instance, td, row, col, prop, value, cellProperties);
   }    
}

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!