本文介绍了如何将HTML放入Slickgrid单元格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我将< a href =#>点击< / a>
添加到slickgrid中时,我会看到实际代码< ; a href =#>点击< / a>
,而我希望渲染链接。
When I put <a href="#">Click</a>
into slickgrid, I see the actual code "<a href="#">Click</a>
", whereas I expect the link to be rendered.
我知道我可以通过订阅点击事件来实现,但是它在SlickGrid中是否受限制?
I know I can do it by subscribing click event but is it restricted thing in SlickGrid?
推荐答案
编写自定义格式化程序:
Write a custom formatter:
function myFormatter(row, cell, value, columnDef, dataContext) {
return "<a href='#'>Click</a>";
}
并在列定义中指定它。
这篇关于如何将HTML放入Slickgrid单元格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!