[英]How to change the color of selected row in gwt-ext grid?
I am want to change the color of selected row of grid (gwt-ext grid) in my application.我想在我的应用程序中更改所选网格行(gwt-ext 网格)的颜色。
For this I have done this:为此,我这样做了:
int rowIndex = getGrid().getStore().indexOf(rec);
Element currentRow = getGrid().getView().getRow(rowIndex);
currentRow.getStyle().setProperty("backgroundColor","red");
But it is permanently changing the color of the row.As I select on another row it previous selected row should be in it previous color.但它会永久改变行的颜色。因为我在另一行上的 select 之前选择的行应该是之前的颜色。
So I am not getting what to do the change the color of selected row in the gwt-ext grid.所以我不知道如何更改 gwt-ext 网格中选定行的颜色。
I also want to know how to change the text color of the grid row?我也想知道如何改变网格行的文字颜色?
addStyleName("myClass")
.addStyleName("myClass")
添加 class 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.