View Full Version : Different row styles in a grid
How can I make rows in the grid look different depending on some condition? I mean smth like that:
You can set a custom GridViewConfig to your GridView. In that you need to override the getRowStyle method
From the documentation:
getRowStyle (http://www.sencha.com/gxtdocs/codeservlet?qn=com.extjs.gxt.ui.client.widget.grid.GridViewConfig&name=GridViewConfig&line=19) ( ModelData (http://www.sencha.com/gxtdocs/#com.extjs.gxt.ui.client.widget.layout.VBoxLayout) model, int rowIndex, ListStore (http://www.sencha.com/gxtdocs/#com.extjs.gxt.ui.client.widget.layout.VBoxLayout)<ModelData> ds ) : java.lang.String Returns one to many CSS style names separated by spaces.
How should I use it? I thought I needed an opposite method, smth like setRowStyle, didn't I?
Simple extend GridViewConfig and override that method. In that method you can return the styles you want to display.
I've got it. Thank you, Sven.
Is it possible to make an "hover" pseudo-class or some acronym in the stylesheet then?
Powered by vBulletin® Version 4.1.5 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.