我使用以下代码使用dojo dataGrid呈现表。 但是,我需要关闭每个单元格周围的边界线(水平和垂直) 完全。 你能告诉我怎么做到这一点吗? (例如,我应该为此定义其他CSS吗?)
非常感谢!
dojo.ready(function() {
var layout = [
{type: "dojox.grid._CheckBoxSelector"},
[
{ name: "Photo", field: "Photo", width: "10%",
formatter: function(field){
return "<img src='/images/test.gif' WIDTH=45 HEIGHT=45>";
}
},
{ name: "Summary", fields:["column1", "column2", "column3", "column4"],editable:true,width: "80%" ,
formatter: function(fields){
var column1 = fields[0],
column2 = fields[1],
column3 = fields[2],
column4 = fields[3];
return "<h4 class='namelink'><a href='javascript:;'>" +column1+ " "+ column2 + "</a></h4>" + "<div class='namelink'> <a href='javascript:;'>"+ "Another Name" + "</a></div>" + column3 + "<br>" + "<div class='addresslink'> <a href='javascript:;'>"+column4+"</a> </div>";
}
}
]
]
var mygrid = new dojox.grid.DataGrid({
id: "gridId",
store: store,
autowidth:"true",
rowselector:"15px",
keepRows: "30",
rowsPerPage: "10",
style:"height:300px",
structure: layout},"gridContainer");
mygrid.startup();
dojo.connect(mygrid, "onApplyEdit", function(row){
store.save();
});
});
答案 0 :(得分:1)
.dojoxGridCell {
border: none !important;
}
编辑:仅限顶部和底部
.dojoxGridCell {
border-width: 1px 0 !important;
}