由于 td 元素上的 nowrap 似乎在 IE 中不起作用,请参阅这个问题,我迫切需要帮助如何在 Dojox Datagrid 中的每个单元格中添加一个带有 nowrap 的 span 元素,而无需定义字段格式化程序来完成此操作。
在这里查看 jsfiddle http://jsfiddle.net/HkxHZ/4/
使用这个 css 我在 Chrome 和 FF 中得到了我想要的,即没有自动换行和溢出隐藏。但它在IE中不起作用..
<style type="text/css">
.dojoxGridRowTable {
table-layout: fixed;
width: 0px;}
.dojoxGrid .dojoxGridCell {
text-align: left;
overflow:hidden;
white-space:nowrap;}
</style>