---
title: "gridPanel设置行变色"
author: "zhihchen"
date: "2014-05-16T10:09:06Z"
tags: []
categories: ["研发管理"]
slug: "gridpanel"
draft: false
lastmod: "2014-05-16T10:09:06Z"
id: 2067196
url: "https://zhihchen.iteye.com/blog/2067196"
---

```java
doStoreLoad: function() {
		this.setContentStyle();
	},
	dbSortchange: function() {
		this.setContentStyle();
	},
	setContentStyle: function() {
		var total =  this.grid.store.getCount(),view = this.grid.getView();
		for(var i=0 ;i<total;i++) {
			var record = this.grid.store.getAt(i);
			var row = view.getRow(i);
			if(record.data.is_disabled == '2') {
				row.style.color='#9D9D9D';
			}
		}
	}
```