1

我使用以下代码使用 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();
    });
});
4

1 回答 1

1
.dojoxGridCell {
  border: none !important;            
}

编辑:仅顶部和底部

.dojoxGridCell {
  border-width: 1px 0 !important;
}
于 2012-06-13T16:14:41.117 回答