当前位置: 代码迷 >> Web前端 >> EXT-GWT grid 点染行背景颜色
  详细解决方案

EXT-GWT grid 点染行背景颜色

热度:77   发布时间:2012-10-30 16:13:36.0
EXT-GWT grid 渲染行背景颜色

EXT-GWT ?grid 渲染特殊行背景颜色

?

CSS 设置:

?

?

.x-grid3-row-spec {
  background-color: #f6ed00 !important;
}
?

?

?

EXT-GWT:

假设设置第5行,第11行背景颜色,

?

?

		grid.getView().setViewConfig(new GridViewConfig(){
			  public String getRowStyle(ModelData model, int rowIndex, ListStore<ModelData> ds) {
				  if(rowIndex==4||rowIndex==10)
				    return "x-grid3-row-spec";
				    else return "";
				  }
		});

?根据某个数据列的属性值设置

?

if( model.get("property").equals("value"))
	return "x-grid3-row-spec";
 else return "";
?

?

?

  相关解决方案