一:
<script type="text/javascript">
var colorRender = function (record, rowIndex, rowParams, store) {
if (record.get("Sex") == '男' ) {
return 'x-grid-record-orange';
}
}
</script>
二:
<style>
.x-grid-record-orange {
background: #ff6d28;
}
</style>
三:
<ViewConfig>
<GetRowClass Fn="colorRender"></GetRowClass>
</ViewConfig>
注:前2点写在head里,最后一点写在gridpanel里