valery.stroeder
4 Feb 2010, 6:40 AM
Hello,
In my Grids, a row of two is green and the others are white thanks this code :
myGrid.getView().setViewConfig(new GridViewConfig(){
@Override
public String getRowStyle(final ModelData model, final int rowIndex, final ListStore<ModelData> ds) {
String returnTemp;
if(rowIndex%2==0) {
returnTemp = "even";
} else {
returnTemp = "odd";
}
return returnTemp;
}
});
in the style.css file
.even {
background-color:green;
}
.odd {
background-color:white;
}
Is there a way to do the samething in a ListView ?
In my Grids, a row of two is green and the others are white thanks this code :
myGrid.getView().setViewConfig(new GridViewConfig(){
@Override
public String getRowStyle(final ModelData model, final int rowIndex, final ListStore<ModelData> ds) {
String returnTemp;
if(rowIndex%2==0) {
returnTemp = "even";
} else {
returnTemp = "odd";
}
return returnTemp;
}
});
in the style.css file
.even {
background-color:green;
}
.odd {
background-color:white;
}
Is there a way to do the samething in a ListView ?