我有一个网格,我想改变背景颜色,你知道怎么做吗?
谢谢你的帮助,祝你愉快。
下面是我的代码:
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>发布于 2009-12-04 07:08:17
您可以使用onStyleRow事件,也可以直接调整CSS -在您的情况下:
.tundra #gridWeight .dojoxGridRow,
.tundra #gridWeight .dojoxGridRowOdd {
background: red;
}https://stackoverflow.com/questions/1339047
复制相似问题