如何在SlickGrid中将类添加到单元格 [英] How to add a class to a cell in SlickGrid

查看:144
本文介绍了如何在SlickGrid中将类添加到单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何在SlickGrid中将"myClass"类添加到某个单元格中(例如第5行,第3列)吗?

解决方案

要将特定的CSS类添加到某些行中,请使用最近在

也许您可以将两者结合使用. 另一种方法是使用自定义格式器将内部DIV放入单元格中,然后在其中设置类.由于您可以访问格式化程序中的行/单元格,因此可以决定如何呈现它.

Does anyone has an idea how could I add "myClass" class to some cell (for example, row 5, column 3) in a SlickGrid ?

To add a specific CSS class to some of the rows, use the "rowClasses" option added recently in http://github.com/mleibman/SlickGrid/commit/26d525a136e74e0fd36f6d45f0d53d1ce2df40ed

You cannot add a CSS class to a specific cell, only to all cells in a given column - use the "cssClass" property on the column definition.

Perhaps you can use a combination of those two. Another way is to put an inner DIV inside a cell using a custom formatter and set the class there. Since you have access to row/cell within the formatter, you can decide how to render it.

这篇关于如何在SlickGrid中将类添加到单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆