How to put HTML into Slickgrid cell?

筅森魡賤 提交于 2019-12-04 08:16:20

Write a custom formatter:

function myFormatter(row, cell, value, columnDef, dataContext) {
  return "<a href='#'>Click</a>";
}

and specify it in the column definition.

From @RicardoStuven

Or use the defaultFormatter option to treat any value as HTML:

defaultFormatter: function (row, cell, value, columnDef, dataContext) { 
    if (value == null) return ''; 

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