gridPanel的行背景色 根据列值变化
JS:
var getRowClass = function (record, rowIndex, p, ds) {
var reColor = "";
if (record.data.RIQI.getDay() == 5 || record.data.RIQI.getDay() == 6) {
reColor = "x-grid-row-summary";
}
return reColor;
};
CSS:
<style type="text/css">
.x-grid-row .x-grid-cell-inner
{
height: 15px;
}
.x-grid-row-summary .x-grid-cell-inner
{
background-color: #D4D0C8;
}
</style>
aspx:
<ext:GridPanel>
.....
<View>
<ext:GridView ID="GridView3" runat="server" ForceFit="true">
<GetRowClass Fn="getRowClass" />
</ext:GridView>
</View>
</ext:GridPanel>
另外有一个看不懂,但看似不错:
http://www.cnblogs.com/kunpengit/archive/2012/11/06/2756709.html