1

I used the following code to render a table using dojo dataGrid. However, I need to turn off the borderlines around each cell (both horizontal and vertical) completely. Could you please let me know how to accomplish this? (e.g. should I define additional CSS for this?)

Thanks a lot!

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();
    });
});

1 Answer 1

1
.dojoxGridCell {
  border: none !important;            
}

EDIT: top and bottom only

.dojoxGridCell {
  border-width: 1px 0 !important;
}
1
  • Hello, Thanks for the quick responses. Is there a way to turn off the two vertical borders but keep the top + bottom borders?
    – dojomedojo
    Commented Jun 13, 2012 at 17:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.