dojox.Grid行背景颜色

时间:2009-08-27 05:36:56

标签: dojo

我有一个网格,我想改变背景颜色,你知道怎么做吗?

感谢您的帮助,祝您度过愉快的一天。

这是我的代码:

var jsonStore = new dojo.data.ItemFileReadStore({url: "..." ?>"});

var model = new dojox.grid.data.DojoData(null,jsonStore,{jsId: 'model', rowsPerPage: 20, query: { date: '*' }});

var view1 = {
        cells: [[
                {name: 'x', width: "80px", field: "date"},
                {name: 'y', width: "50px", field: "weight"},
                {name: 'z', width: "100px", field: "nurse"}
          ]]
};
var layout = [ view1 ];

<div id="gridWeight" dojoType="dojox.Grid" model="model" structure="layout" autoWidth="true" style="height: 150px"></div>

1 个答案:

答案 0 :(得分:0)

您可以使用onStyleRow事件或直接调整CSS - 在您的情况下:

.tundra #gridWeight .dojoxGridRow,
.tundra #gridWeight .dojoxGridRowOdd {
    background: red;
}
相关问题